AfterPropertiesSet() public method

Initializes factory object.
public AfterPropertiesSet ( ) : void
return void
        public void ReturnsInterfaceImplementation()
        {
            RemoteObjectFactory factory = new RemoteObjectFactory();
            factory.Target = new SimpleCounter();
            factory.AfterPropertiesSet();

            object obj = factory.GetObject();

            Assert.IsTrue((obj is ISimpleCounter), "Object should implement an interface.");
        }
        public void CreateRemoteObject()
        {
            RemoteObjectFactory factory = new RemoteObjectFactory();
            factory.Target = new SimpleCounter();
            factory.AfterPropertiesSet();

            object obj = factory.GetObject();

            Assert.IsTrue((obj is MarshalByRefObject), "Object should derive from MarshalByRefObject.");
        }
        public void ReturnsInterfaceImplementation()
        {
            RemoteObjectFactory factory = new RemoteObjectFactory();

            factory.Target = new SimpleCounter();
            factory.AfterPropertiesSet();

            object obj = factory.GetObject();

            Assert.IsTrue((obj is ISimpleCounter), "Object should implement an interface.");
        }
        public void CreateRemoteObject()
        {
            RemoteObjectFactory factory = new RemoteObjectFactory();

            factory.Target = new SimpleCounter();
            factory.AfterPropertiesSet();

            object obj = factory.GetObject();

            Assert.IsTrue((obj is MarshalByRefObject), "Object should derive from MarshalByRefObject.");
        }
 public void BailsWhenNotConfigured()
 {
     RemoteObjectFactory factory = new RemoteObjectFactory();
     factory.AfterPropertiesSet();
 }
        public void BailsWhenNotConfigured()
        {
            RemoteObjectFactory factory = new RemoteObjectFactory();

            Assert.Throws <ArgumentException>(() => factory.AfterPropertiesSet(), "The Target property is required.");
        }
 public void BailsWhenNotConfigured()
 {
     RemoteObjectFactory factory = new RemoteObjectFactory();
     Assert.Throws<ArgumentException>(() => factory.AfterPropertiesSet(), "The Target property is required.");
 }
        public void BailsWhenNotConfigured()
        {
            RemoteObjectFactory factory = new RemoteObjectFactory();

            factory.AfterPropertiesSet();
        }