public void DoesNotCacheInstances()
        {
            var activator = new DefaultViewActivator();
            var instance1 = activator.Instantiate(typeof(DataSet));
            var instance2 = activator.Instantiate(typeof(DataSet));

            Assert.AreNotSame(instance1, instance2);
        }
        public void UsesActivatorClassToCreateObjects()
        {
            var activator = new DefaultViewActivator();
            var instance  = activator.Instantiate(typeof(DataSet));

            Assert.IsNotNull(instance);
            Assert.IsInstanceOf <DataSet>(instance);
        }
        public void OnlySupportsTypesWithPublicParameterlessConstructor()
        {
            var activator = new DefaultViewActivator();

            Assert.Throws <NotSupportedException>(() => activator.Instantiate(typeof(X)));
        }
        public void ViewTypeIsRequired()
        {
            var activator = new DefaultViewActivator();

            Assert.Throws <ArgumentNullException>(() => activator.Instantiate(null));
        }