コード例 #1
0
        // [TestCase(typeof(CircularDependencyInModelError))]
        public void TestError(Type type)
        {
            var serializer = new ReflectionSerializersFactory(new SimpleTypesCatalog());
            var activator  = new ReflectionRdActivator(serializer, null);
            var exception  = Assert.Throws <Assertion.AssertionException>(() => activator.Activate(type));

            Console.WriteLine(exception);
        }
コード例 #2
0
        // [TestCase(typeof(CircularDependencyInModelError))]
        public void TestError(Type type)
        {
            var serializer = new ReflectionSerializers();
            var activator  = new ReflectionRdActivator(serializer, null);
            var exception  = Assert.Throws <Assertion.AssertionException>(() => activator.ActivateRdExt(type));

            Console.WriteLine(exception);
        }
コード例 #3
0
        public void TestActivation()
        {
            var serializer = new ReflectionSerializersFactory(new SimpleTypesCatalog());
            var activator  = new ReflectionRdActivator(serializer, null);
            var model      = activator.Activate <ModelCalls>();

            Assert.NotNull(model);
            Assert.NotNull(model.Rpc1);
            Assert.NotNull(model.Rpc2);
        }
コード例 #4
0
        public void TestActivation2()
        {
            var serializer = new ReflectionSerializersFactory(new SimpleTypesCatalog());
            var activator  = new ReflectionRdActivator(serializer, null);
            var model      = activator.Activate <RootModel>();

            Assert.NotNull(model);
            Assert.NotNull(model.EmptyOK);
            Assert.NotNull(model.FieldsNotNullOk);
            Assert.NotNull(model.FieldsNullableOk);
            Assert.Null(model.Nested); // nested models not supported anymore
            Assert.NotNull(model.PropertiesNotNullOk);
            Assert.NotNull(model.PropertiesNullOk);
        }
コード例 #5
0
        public override void SetUp()
        {
            var reflectionSerializers = new ReflectionSerializers();

            myPolymorphicRdTypesCatalog = new TestRdTypesCatalog(reflectionSerializers);
            myPolymorphicRdTypesCatalog.Register <Animal>();
            myPolymorphicRdTypesCatalog.Register <Bear>();
            myPolymorphicRdTypesCatalog.Register <EmptyOK>();

            myReflectionRdActivator = new ReflectionRdActivator(reflectionSerializers, myPolymorphicRdTypesCatalog as IPolymorphicTypesCatalog);

            base.SetUp();
            ServerWire.AutoTransmitMode = true;
            ClientWire.AutoTransmitMode = true;
        }
コード例 #6
0
 public ModelOwner(ReflectionRdActivator activator)
 {
     myActivator = activator;
 }
コード例 #7
0
 public void TestActivation(Type type)
 {
     var serializer      = new ReflectionSerializersFactory(new SimpleTypesCatalog());
     var activator       = new ReflectionRdActivator(serializer, null);
     var activateRdModel = activator.Activate(type);
 }
コード例 #8
0
 public void TestActivation(Type type)
 {
     var serializer      = new ReflectionSerializers();
     var activator       = new ReflectionRdActivator(serializer, null);
     var activateRdModel = activator.ActivateRdExt(type);
 }