Esempio n. 1
0
        public void Create_Returns_Null_When_Null_Is_Passed_In()
        {
            //Arrange
            var fac = new ParamsViewFactory();

            //Act
            IParamsView view = fac.Create(null);

            //Assert
            Assert.Null(view);
        }
Esempio n. 2
0
        public void Create_Returns_Params_Ctrl_When_Bag_Has_Params(Type mgrType, Type bagType, Type expectedCtrlType)
        {
            //Arrange
            var fac = new ParamsViewFactory();
            var mgrCtor = mgrType.GetConstructor(new Type[] { });
            var mgr = mgrCtor.Invoke(null) as IParamMgr;

            //Act
            IParamsView view = fac.Create(mgr);

            //Assert
            Assert.NotNull(view);
            Assert.IsType(expectedCtrlType, view);
        }