aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
diff options
context:
space:
mode:
authorJie Luo <jieluo@google.com>2015-04-30 11:23:09 -0700
committerJie Luo <jieluo@google.com>2015-04-30 11:23:09 -0700
commit24ae5105f3bd44d39303d7e76edb659cca01f97b (patch)
treebeb5264eca24e47d4912f35a8b4b12b8978c07f6 /csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
parent954bc834133289cd7c844ab4195f574223a0e593 (diff)
parent0884b77975146be5d0557b254fbeab940cda641a (diff)
downloadprotobuf-24ae5105f3bd44d39303d7e76edb659cca01f97b.tar.gz
protobuf-24ae5105f3bd44d39303d7e76edb659cca01f97b.tar.bz2
protobuf-24ae5105f3bd44d39303d7e76edb659cca01f97b.zip
Merge branch 'csharp' of git://github.com/google/protobuf into google-csharp
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs')
-rw-r--r--csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs21
1 files changed, 9 insertions, 12 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs b/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
index 0901f043..21d21928 100644
--- a/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
@@ -1,22 +1,19 @@
using System;
-using System.Collections.Generic;
using System.Reflection;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using UnitTest.Issues.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class DeprecatedMemberTest
{
private static void AssertIsDeprecated(MemberInfo member)
{
- Assert.IsNotNull(member);
- Assert.IsTrue(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
+ Assert.NotNull(member);
+ Assert.True(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
}
- [TestMethod]
+ [Fact]
public void TestDepreatedPrimitiveValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasPrimitiveValue"));
@@ -27,7 +24,7 @@ namespace Google.ProtocolBuffers
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetPrimitiveValue"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedPrimitiveArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveArrayList"));
@@ -42,7 +39,7 @@ namespace Google.ProtocolBuffers
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangePrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveArray"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedMessageValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasMessageValue"));
@@ -55,7 +52,7 @@ namespace Google.ProtocolBuffers
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild.Builder) }));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedMessageArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageArrayList"));
@@ -72,7 +69,7 @@ namespace Google.ProtocolBuffers
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangeMessageArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearMessageArray"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedEnumValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasEnumValue"));
@@ -83,7 +80,7 @@ namespace Google.ProtocolBuffers
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearEnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetEnumValue"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedEnumArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumArrayList"));