diff options
author | Jon Skeet <jonskeet@google.com> | 2015-05-12 09:47:19 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-05-12 09:48:02 +0100 |
commit | 90c8932fc7316b5afaae350395624b6fd2e73a97 (patch) | |
tree | 080924d0a9fd8f52d88b1ee4fb76f9aa3bd802cd /csharp/src/ProtocolBuffers.Test/Collections | |
parent | c58b2c66448f83c25da0251fe6cf5b12299fa581 (diff) | |
download | protobuf-90c8932fc7316b5afaae350395624b6fd2e73a97.tar.gz protobuf-90c8932fc7316b5afaae350395624b6fd2e73a97.tar.bz2 protobuf-90c8932fc7316b5afaae350395624b6fd2e73a97.zip |
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.
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/Collections')
-rw-r--r-- | csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs | 34 |
1 files changed, 17 insertions, 17 deletions
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<string> list = new PopsicleList<string>();
@@ -55,20 +55,20 @@ namespace Google.ProtocolBuffers.Collections Assert.Throws<NotSupportedException>(() => list.Add(new[] { "", "" }));
}
- [Fact]
+ [Test]
public void NonMutatingOperationsOnFrozenList()
{
PopsicleList<string> list = new PopsicleList<string>();
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<string> list = new PopsicleList<string>();
@@ -80,26 +80,26 @@ namespace Google.ProtocolBuffers.Collections list.RemoveAt(0);
}
- [Fact]
+ [Test]
public void NonMutatingOperationsOnFluidList()
{
PopsicleList<string> list = new PopsicleList<string>();
- 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<string> list = new PopsicleList<string>();
Assert.Throws<ArgumentNullException>(() => list.Add((IEnumerable<string>) null));
}
- [Fact]
+ [Test]
public void DoesNotAddRangeWithNull()
{
PopsicleList<string> list = new PopsicleList<string>();
@@ -107,14 +107,14 @@ namespace Google.ProtocolBuffers.Collections Assert.Throws<ArgumentNullException>(() => list.Add(new[] {"a", "b", null}));
}
- [Fact]
+ [Test]
public void DoesNotAddNull()
{
PopsicleList<string> list = new PopsicleList<string>();
Assert.Throws<ArgumentNullException>(() => list.Add((string) null));
}
- [Fact]
+ [Test]
public void DoesNotSetNull()
{
PopsicleList<string> list = new PopsicleList<string>();
|