public void ShouldThrowWhenNoFilesProvided() { // Given ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate()); // When, Then Assert.Throws <ArgumentException>(() => fixture.Run()); }
public void ShouldThrowOnNullProjectPath() { // Given ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate()) { ProjectFilePath = null }; // When, Then Assert.Throws <ArgumentNullException>(() => fixture.Run()); }
public void ShouldAddMultipleFiles() { // Given ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx", "script.csx")); // When ToolFixtureResult result = fixture.Run(); // Then FilePath proj = fixture.GetProjectFilePath(); Assert.True(result.Args == $"\"{proj}\" \"file.csx\" \"script.csx\""); }
public void ShouldAddProjectFile() { // Given ScriptyFixture fixture = new ScriptyFixture(r => r.Evaluate("file.csx")); // When ToolFixtureResult result = fixture.Run(); // Then FilePath proj = fixture.GetProjectFilePath(); Assert.True(result.Args.StartsWith($"\"{proj}\"")); }