private static void TestCore <T>(params string[] expectedMemberNames) { var expected = expectedMemberNames.OrderBy(n => n).ToArray(); var actual = SerializationTarget.GetTargetMembers(typeof(T)).OrderBy(m => m.Member.Name).Select(m => m.Member.Name).ToArray(); Assert.That(actual, Is.EqualTo(expected), String.Join(", ", actual)); }
public void TestAliasInMessagePackMember() { var target = SerializationTarget.GetTargetMembers(typeof(AnnotatedClass)); Assert.That(target.Any(m => m.Contract.Name == "Alias" && m.Contract.Name != m.Member.Name)); }
public void TestAliasInDataMember() { var target = SerializationTarget.GetTargetMembers(typeof(DataMamberClass)); Assert.That(target.Any(m => m.Contract.Name == "Alias" && m.Contract.Name != m.Member.Name)); }
public void TestIndexerOverload() { Assert.That(SerializationTarget.GetTargetMembers(typeof(WithIndexerOverload)).Any(), Is.False); }