Ejemplo n.º 1
0
        public void ValidateFromParsable()
        {
            object           obj     = new AggregateNumbers();
            CommandArguments cmdArgs = CommandArguments.FromParsable(obj);

            Assert.IsNotNull(cmdArgs);
        }
 public void ValidateFromParsable()
 {
     object obj = new AggregateNumbers();
     Type parseType = typeof(AggregateNumbers);
     bool suppressDefaults = true;
     ConstructorArguments ctorArgs = ConstructorArguments.FromParsable(obj, parseType, suppressDefaults);
     Assert.IsNotNull(ctorArgs);
 }
        public void ValidateFromParsable()
        {
            object obj                    = new AggregateNumbers();
            Type   parseType              = typeof(AggregateNumbers);
            bool   suppressDefaults       = true;
            ConstructorArguments ctorArgs = ConstructorArguments.FromParsable(obj, parseType, suppressDefaults);

            Assert.IsNotNull(ctorArgs);
        }
        public void ValidateToStringWithParams()
        {
            object parsableObject   = new AggregateNumbers();
            bool   suppressDefaults = false;
            string str = ConstructorArguments.ToString(parsableObject, suppressDefaults);

            Assert.IsTrue(str.Contains("AggregateNumbers"));
            Assert.IsTrue(str.Contains("Cleanup"));
            Assert.IsTrue(str.Contains("ResultFile"));
            Assert.IsTrue(str.Contains("InputFile"));
        }
        public void ValidateToString()
        {
            object obj                    = new AggregateNumbers();
            Type   parseType              = typeof(AggregateNumbers);
            bool   suppressDefaults       = true;
            ConstructorArguments ctorArgs = ConstructorArguments.FromParsable(obj, parseType, suppressDefaults);
            string str                    = ctorArgs.ToString();

            Assert.IsTrue(str.Contains("ResultFile"));
            Assert.IsTrue(str.Contains("InputFile"));
        }
Ejemplo n.º 6
0
        public void ValidateConstructTString()
        {
            string fileName = Path.GetTempFileName();

            fileName = fileName.Replace(Path.GetTempPath(), "");
            using (File.Create(fileName)) { }
            string           args          = "(" + fileName + ")";
            AggregateNumbers aggregateNums = CommandArguments.Construct <AggregateNumbers>(args);

            Assert.IsNotNull(aggregateNums);
        }
        public void ValidateConstructT()
        {
            string fileName = Path.GetTempFileName();

            fileName = fileName.Replace(Path.GetTempPath(), "");
            string fileName1 = Path.GetTempFileName();

            fileName1 = fileName1.Replace(Path.GetTempPath(), "");
            using (File.Create(fileName)) { }
            using (File.Create(fileName1)) { }
            string           args          = "(ResultFile:(" + fileName + "),(" + fileName1 + "))";
            AggregateNumbers aggregateNums = ConstructorArguments.Construct <AggregateNumbers>(args);

            Assert.IsNotNull(aggregateNums);
        }
 public void ValidateToStringWithParams()
 {
     object parsableObject = new AggregateNumbers();
     bool suppressDefaults = false;
     string str = ConstructorArguments.ToString(parsableObject, suppressDefaults);
     Assert.IsTrue(str.Contains("AggregateNumbers"));
     Assert.IsTrue(str.Contains("Cleanup"));
     Assert.IsTrue(str.Contains("ResultFile"));
     Assert.IsTrue(str.Contains("InputFile"));
 }
 public void ValidateToString()
 {
     object obj = new AggregateNumbers();
     Type parseType = typeof(AggregateNumbers);
     bool suppressDefaults = true;
     ConstructorArguments ctorArgs = ConstructorArguments.FromParsable(obj, parseType, suppressDefaults);
     string str = ctorArgs.ToString();
     Assert.IsTrue(str.Contains("ResultFile"));
     Assert.IsTrue(str.Contains("InputFile"));
 }
Ejemplo n.º 10
0
 public void ValidateFromParsable()
 {
     object obj = new AggregateNumbers();
     CommandArguments cmdArgs = CommandArguments.FromParsable(obj);
     Assert.IsNotNull(cmdArgs);
 }