public void ExecutorInitializeWithValidListTestsTargetPathShouldAddListTestsTargetPathToCommandLineOptions() { var options = CommandLineOptions.Instance; ListTestsTargetPathArgumentExecutor executor = new ListTestsTargetPathArgumentExecutor(options); executor.Initialize(@"C:\sample.txt"); Assert.AreEqual(@"C:\sample.txt", options.ListTestsTargetPath); }
public void ExecutorInitializeWithNullOrEmptyListTestsTargetPathShouldThrowCommandLineException() { var options = CommandLineOptions.Instance; ListTestsTargetPathArgumentExecutor executor = new ListTestsTargetPathArgumentExecutor(options); try { executor.Initialize(null); } catch (Exception ex) { Assert.IsTrue(ex is CommandLineException); StringAssert.Contains(ex.Message, "ListTestsTargetPath is required with ListFullyQualifiedTests!"); } }