From 90c8932fc7316b5afaae350395624b6fd2e73a97 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Tue, 12 May 2015 09:47:19 +0100 Subject: Convert back to using NUnit, which is now loaded via NuGet. This includes the NUnit test adapter which allows NUnit tests to be run under VS without any extra plugins. Unfortunate the compatibility tests using the abstract test fixture class show up as "external" tests, and aren't well presented - but they do run. --- .../Collections/PopsicleListTest.cs | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'csharp/src/ProtocolBuffers.Test/Collections') diff --git a/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs b/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs index 29584705..f336a84b 100644 --- a/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs +++ b/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs @@ -36,13 +36,13 @@ using System; using System.Collections.Generic; -using Xunit; +using NUnit.Framework; namespace Google.ProtocolBuffers.Collections { public class PopsicleListTest { - [Fact] + [Test] public void MutatingOperationsOnFrozenList() { PopsicleList list = new PopsicleList(); @@ -55,20 +55,20 @@ namespace Google.ProtocolBuffers.Collections Assert.Throws(() => list.Add(new[] { "", "" })); } - [Fact] + [Test] public void NonMutatingOperationsOnFrozenList() { PopsicleList list = new PopsicleList(); list.MakeReadOnly(); - Assert.False(list.Contains("")); - Assert.Equal(0, list.Count); + Assert.IsFalse(list.Contains("")); + Assert.AreEqual(0, list.Count); list.CopyTo(new string[5], 0); list.GetEnumerator(); - Assert.Equal(-1, list.IndexOf("")); - Assert.True(list.IsReadOnly); + Assert.AreEqual(-1, list.IndexOf("")); + Assert.IsTrue(list.IsReadOnly); } - [Fact] + [Test] public void MutatingOperationsOnFluidList() { PopsicleList list = new PopsicleList(); @@ -80,26 +80,26 @@ namespace Google.ProtocolBuffers.Collections list.RemoveAt(0); } - [Fact] + [Test] public void NonMutatingOperationsOnFluidList() { PopsicleList list = new PopsicleList(); - Assert.False(list.Contains("")); - Assert.Equal(0, list.Count); + Assert.IsFalse(list.Contains("")); + Assert.AreEqual(0, list.Count); list.CopyTo(new string[5], 0); list.GetEnumerator(); - Assert.Equal(-1, list.IndexOf("")); - Assert.False(list.IsReadOnly); + Assert.AreEqual(-1, list.IndexOf("")); + Assert.IsFalse(list.IsReadOnly); } - [Fact] + [Test] public void DoesNotAddNullEnumerable() { PopsicleList list = new PopsicleList(); Assert.Throws(() => list.Add((IEnumerable) null)); } - [Fact] + [Test] public void DoesNotAddRangeWithNull() { PopsicleList list = new PopsicleList(); @@ -107,14 +107,14 @@ namespace Google.ProtocolBuffers.Collections Assert.Throws(() => list.Add(new[] {"a", "b", null})); } - [Fact] + [Test] public void DoesNotAddNull() { PopsicleList list = new PopsicleList(); Assert.Throws(() => list.Add((string) null)); } - [Fact] + [Test] public void DoesNotSetNull() { PopsicleList list = new PopsicleList(); -- cgit v1.2.3