public void With_NullArguments() { // Arrange var tool = new CommandLineTool(); // Act tool.ParseArguments(null, null); // Assert // Without arguments the function should process nothing. }
public void With_CountAllVisitsAndOutputFile() { // Arrange var options = new ParsedCommandLineOptions(); const string ArgumentString = "-c test.ink"; string[] args = ArgumentString.Split(" "); var tool = new CommandLineTool(); // Act tool.ParseArguments(args, options); // Assert options.Should().NotBeNull("because the parsing should succeed"); options.InputFilePath.Should().BeEquivalentTo("test.ink"); options.OutputFilePath.Should().BeNull("because none was given"); options.IsCountAllVisitsNeeded.Should().BeTrue("because the count all visits flag was set"); options.IsPlayMode.Should().BeFalse("because the playmode flag was not set"); options.IsVerboseMode.Should().BeFalse("because the verbose flag was not set"); options.IsKeepOpenAfterStoryFinishNeeded.Should().BeFalse("because the keep running after finished flag was not set"); }