// [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); }
// [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); }
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); }
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); }
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; }
public ModelOwner(ReflectionRdActivator activator) { myActivator = activator; }
public void TestActivation(Type type) { var serializer = new ReflectionSerializersFactory(new SimpleTypesCatalog()); var activator = new ReflectionRdActivator(serializer, null); var activateRdModel = activator.Activate(type); }
public void TestActivation(Type type) { var serializer = new ReflectionSerializers(); var activator = new ReflectionRdActivator(serializer, null); var activateRdModel = activator.ActivateRdExt(type); }