예제 #1
0
        public void CanPrepareFromFile()
        {
            using (var testFile = TempFile.CreateRandom())
            {
                OptionsHelper.WriteArgumentsFile(testFile.Path.ToString(),
                                                 new[] { "--from-file-value-one=10", "--from-file-value-two=15" });

                OptionsParser.PrepareFromFile(testFile.Path.ToString(), new Type[] { typeof(FromFileOptions) });

                Assert.AreEqual(10, FromFileOptions.FromFileValueOne);
                Assert.AreEqual(15, FromFileOptions.FromFileValueTwo);
            }
        }