BackupUtilityTest.TestCommandLineArgs.TestTryParseArgs C# (CSharp) Method

TestTryParseArgs() private method

private TestTryParseArgs ( string argsAsString, bool parseValid, CommandLineArgType correctType, string correctFileArg ) : void
argsAsString string
parseValid bool
correctType CommandLineArgType
correctFileArg string
return void
        public void TestTryParseArgs(string argsAsString, bool parseValid, CommandLineArgType correctType, string correctFileArg)
        {
            string[] args = argsAsString.Split(' ');

            bool parsed = CommandLineArgs.TryParseArgs(args, out CommandLineArgType type, out string fileArg);

            Assert.AreEqual(parseValid, parsed);
            Assert.AreEqual(correctType, type);
            Assert.AreEqual(correctFileArg, fileArg);
        }
    }