Example #1
0
        public void RunScript_GetErrorCode2_OptionObject2015_FormCountEquals0()
        {
            // Arrange
            OptionObject2015 optionObject = new OptionObject2015();
            var command = new GetErrorCode2Command(optionObject);

            // Act
            OptionObject2015 returnOptionObject = command.Execute();

            // Assert
            Assert.AreEqual(0, returnOptionObject.Forms.Count);
        }
Example #2
0
        public void RunScript_GetErrorCode2_OptionObject2015_ReturnsErrorCode0()
        {
            // Arrange
            OptionObject2015 optionObject = new OptionObject2015();
            var command = new GetErrorCode2Command(optionObject);

            // Act
            OptionObject2015 returnOptionObject = command.Execute();

            // Assert
            Assert.AreEqual(2, returnOptionObject.ErrorCode);
        }
        public void GetCommand_OptionObject2015_GetErrorCode2_ReturnsGetErrorCode2Command()
        {
            // Arrange
            OptionObject2015     optionObject = new OptionObject2015();
            string               parameter    = "GetErrorCode2";
            GetErrorCode2Command expected     = new GetErrorCode2Command(optionObject);

            // Act
            IRunScriptCommand actual = CommandFactory.GetCommand(optionObject, parameter);

            // Assert
            Assert.AreEqual(expected.GetType(), actual.GetType());
        }
Example #4
0
        public void RunScript_GetErrorCode2_OptionObject2_FormCountEquals0()
        {
            // Arrange
            OptionObject2         optionObject          = new OptionObject2();
            OptionObjectDecorator optionObjectDecorator = new OptionObjectDecorator(optionObject);
            var command = new GetErrorCode2Command(optionObjectDecorator);

            // Act
            OptionObject2 returnOptionObject = (OptionObject2)command.Execute();

            // Assert
            Assert.AreEqual(0, returnOptionObject.Forms.Count);
        }
Example #5
0
        public void RunScript_GetErrorCode2_OptionObject_ReturnsErrorCode0()
        {
            // Arrange
            OptionObject          optionObject          = new OptionObject();
            OptionObjectDecorator optionObjectDecorator = new OptionObjectDecorator(optionObject);
            var command = new GetErrorCode2Command(optionObjectDecorator);

            // Act
            OptionObject returnOptionObject = (OptionObject)command.Execute();

            // Assert
            Assert.AreEqual(2, returnOptionObject.ErrorCode);
        }
Example #6
0
        public void GetCommand_OptionObject2_GetErrorCode2_ReturnsGetErrorCode2Command()
        {
            // Arrange
            OptionObject2          optionObject          = new OptionObject2();
            IParameter             parameter             = new Parameter("GetErrorCode2");
            IOptionObjectDecorator optionObjectDecorator = new OptionObjectDecorator(optionObject);
            GetErrorCode2Command   expected = new GetErrorCode2Command(optionObjectDecorator);

            // Act
            IRunScriptCommand actual = CommandFactory.GetCommand(optionObject, parameter);

            // Assert
            Assert.AreEqual(expected.GetType(), actual.GetType());
        }