示例#1
0
        public void TestArgumentTypeSetNull_FluentAPI_SystemType()
        {
            // Arrange
            string     argumentName = "Argument";
            string     argTypeName  = "int";
            Type       newArgType   = null;
            SGArgument arg          = new SGArgument(argTypeName, argumentName);

            // Act
            arg = arg.WithArgumentTypeName(newArgType);
        }
示例#2
0
        public void TestArgumentTypeSetEmpty_FluentAPI_ThrowsArgumentException()
        {
            // Arrange
            string     argumentName   = "Argument";
            string     argTypeName    = "int";
            string     newArgTypeName = String.Empty;
            SGArgument arg            = new SGArgument(argTypeName, argumentName);

            // Act
            arg = arg.WithArgumentTypeName(newArgTypeName);
        }
示例#3
0
        public void TestArgumentTypeSet_FluentAPI_SystemType()
        {
            // Arrange
            string     argumentName = "Argument";
            string     argTypeName  = "int";
            Type       newArgType   = typeof(bool);
            SGArgument arg          = new SGArgument(argTypeName, argumentName);

            // Act
            arg = arg.WithArgumentTypeName(newArgType);

            // Assert
            Assert.AreEqual(newArgType.Name, arg.ArgumentTypeName);
        }
示例#4
0
        public void TestArgumentTypeSet_FluentAPI()
        {
            // Arrange
            string     argumentName   = "Argument";
            string     argTypeName    = "int";
            string     newArgTypeName = "bool";
            SGArgument arg            = new SGArgument(argTypeName, argumentName);

            // Act
            arg = arg.WithArgumentTypeName(newArgTypeName);

            // Assert
            Assert.AreEqual(newArgTypeName, arg.ArgumentTypeName);
        }