From 0889757adc33fa2d81cd24c9792b2451eadf09a9 Mon Sep 17 00:00:00 2001 From: ermau Date: Mon, 26 Sep 2011 22:23:15 -0400 Subject: [PATCH] Move FakeBuffer to its own file --- WinRT.NET/Tests/Streams/FakeBuffer.cs | 45 +++++++++++++++++++ .../WindowsRuntimeBufferExtensionsTests.cs | 16 ------- WinRT.NET/Tests/WinRT.NET.Tests.csproj | 1 + 3 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 WinRT.NET/Tests/Streams/FakeBuffer.cs diff --git a/WinRT.NET/Tests/Streams/FakeBuffer.cs b/WinRT.NET/Tests/Streams/FakeBuffer.cs new file mode 100644 index 0000000..643199c --- /dev/null +++ b/WinRT.NET/Tests/Streams/FakeBuffer.cs @@ -0,0 +1,45 @@ +// +// FakeBuffer.cs +// +// Author: +// Eric Maupin +// +// 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; + } + } +} diff --git a/WinRT.NET/Tests/Streams/WindowsRuntimeBufferExtensionsTests.cs b/WinRT.NET/Tests/Streams/WindowsRuntimeBufferExtensionsTests.cs index f041088..7ae2b06 100644 --- a/WinRT.NET/Tests/Streams/WindowsRuntimeBufferExtensionsTests.cs +++ b/WinRT.NET/Tests/Streams/WindowsRuntimeBufferExtensionsTests.cs @@ -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; - } - } - } } diff --git a/WinRT.NET/Tests/WinRT.NET.Tests.csproj b/WinRT.NET/Tests/WinRT.NET.Tests.csproj index e6d177f..f193e2d 100644 --- a/WinRT.NET/Tests/WinRT.NET.Tests.csproj +++ b/WinRT.NET/Tests/WinRT.NET.Tests.csproj @@ -54,6 +54,7 @@ +