Skip to content
This repository has been archived by the owner on Feb 16, 2018. It is now read-only.

Commit

Permalink
Move FakeBuffer to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
ermau committed Sep 27, 2011
1 parent f0d6b3e commit 0889757
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 16 deletions.
45 changes: 45 additions & 0 deletions WinRT.NET/Tests/Streams/FakeBuffer.cs
@@ -0,0 +1,45 @@
//
// FakeBuffer.cs
//
// Author:
// Eric Maupin <me@ermau.com>
//
// Copyright (c) 2011 Eric Maupin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using Windows.Storage.Streams;

namespace WinRTNET.Tests.Streams
{
internal class FakeBuffer
: IBuffer
{
public uint Capacity
{
get { return 1; }
}

public uint Length
{
get;
set;
}
}
}
16 changes: 0 additions & 16 deletions WinRT.NET/Tests/Streams/WindowsRuntimeBufferExtensionsTests.cs
Expand Up @@ -207,21 +207,5 @@ public void TryGetUnderlyingData()
Assert.AreSame (odata, data);
Assert.AreEqual (1, offset);
}

private class FakeBuffer
: IBuffer
{
public uint Capacity
{
get { return 1; }
}

public uint Length
{
get;
set;
}
}

}
}
1 change: 1 addition & 0 deletions WinRT.NET/Tests/WinRT.NET.Tests.csproj
Expand Up @@ -54,6 +54,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Streams\DataReaderTests.cs" />
<Compile Include="Streams\DataWriterTests.cs" />
<Compile Include="Streams\FakeBuffer.cs" />
<Compile Include="Streams\InputStreamToStreamAdapterTests.cs" />
<Compile Include="Streams\OutputStreamToStreamAdapterTests.cs" />
<Compile Include="Streams\WindowsRuntimeBufferExtensionsTests.cs" />
Expand Down

0 comments on commit 0889757

Please sign in to comment.