예제 #1
0
        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));
        }
예제 #2
0
        public void TestAliasInMessagePackMember()
        {
            var target = SerializationTarget.GetTargetMembers(typeof(AnnotatedClass));

            Assert.That(target.Any(m => m.Contract.Name == "Alias" && m.Contract.Name != m.Member.Name));
        }
예제 #3
0
        public void TestAliasInDataMember()
        {
            var target = SerializationTarget.GetTargetMembers(typeof(DataMamberClass));

            Assert.That(target.Any(m => m.Contract.Name == "Alias" && m.Contract.Name != m.Member.Name));
        }
예제 #4
0
 public void TestIndexerOverload()
 {
     Assert.That(SerializationTarget.GetTargetMembers(typeof(WithIndexerOverload)).Any(), Is.False);
 }