public void CreateComplex_MustOk() { var root = ConfigHelper.CreateEmptyRoot(); var c = BinderConfigurationExtensions.CreateComplexProxy <ComplexClass>(root); Assert.IsNotNull(c); }
public void CreateProxy_MustOk() { var root = ConfigHelper.CreateEmptyRoot(); var c = BinderConfigurationExtensions.CreateProxy <NullClass>(root); Assert.IsNotNull(c); c = BinderConfigurationExtensions.CreateProxy <NullClass>(root, NullNameTransfer.Instance); Assert.IsNotNull(c); }
public void GivenNullCall_MustThrowException() { var root = ConfigHelper.CreateEmptyRoot(); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.AutoCreateProxy <object>(null)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.AutoCreateProxy(root, null)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateComplexProxy <object>(null)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateComplexProxy(root, null)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateProxy <object>(null)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateProxy <object>(null, null)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateProxy(root, null)); Assert.ThrowsException <ArgumentException>(() => BinderConfigurationExtensions.AutoCreateProxy <object>(root, (string)null)); Assert.ThrowsException <ArgumentException>(() => BinderConfigurationExtensions.AutoCreateProxy <object>(root, null, NullNameTransfer.Instance)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.AutoCreateProxy(root, null, "dwadw")); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.AutoCreateProxy(root, null, "dwadw", NullNameTransfer.Instance)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateProxy <object>(null, NullNameTransfer.Instance)); Assert.ThrowsException <ArgumentNullException>(() => BinderConfigurationExtensions.CreateProxy(root, null, NullNameTransfer.Instance)); }