public void Should_Throw_If_Context_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); var processor = fixture.CreateProcessor(); // When var result = Record.Exception(() => processor.Process("./build.cake", null)); // Then Assert.IsArgumentNullException(result, "context"); }
public void Should_Throw_If_File_Path_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); var processor = fixture.CreateProcessor(); // When var result = Record.Exception(() => processor.Process(null, new ScriptProcessorContext())); // Then Assert.IsArgumentNullException(result, "path"); }
public void Should_Throw_If_Log_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); fixture.Log = null; // When var result = Record.Exception(() => fixture.CreateProcessor()); // Then Assert.IsArgumentNullException(result, "log"); }
public void Should_Throw_If_File_System_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); fixture.FileSystem = null; // When var result = Record.Exception(() => fixture.CreateProcessor()); // Then AssertEx.IsArgumentNullException(result, "fileSystem"); }
public void Should_Throw_If_Context_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); var processor = fixture.CreateProcessor(); // When var result = Record.Exception(() => processor.Process("./build.cake", null)); // Then Assert.IsType <ArgumentNullException>(result); Assert.Equal("context", ((ArgumentNullException)result).ParamName); }
public void Should_Throw_If_File_Path_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); var processor = fixture.CreateProcessor(); // When var result = Record.Exception(() => processor.Process(null, new ScriptProcessorContext())); // Then Assert.IsType <ArgumentNullException>(result); Assert.Equal("path", ((ArgumentNullException)result).ParamName); }
public void Should_Throw_If_NuGet_Package_Installer_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); fixture.Installer = null; // When var result = Record.Exception(() => fixture.CreateProcessor()); // Then Assert.IsArgumentNullException(result, "installer"); }
public void Should_Throw_If_Environment_Is_Null() { // Given var fixture = new ScriptProcessorFixture(); fixture.Environment = null; // When var result = Record.Exception(() => fixture.CreateProcessor()); // Then Assert.IsType <ArgumentNullException>(result); Assert.Equal("environment", ((ArgumentNullException)result).ParamName); }