public void Should_Throw_If_Username_Is_Null() { // Given var fixture = new GoCDFixture(); var appVeyor = fixture.CreateGoCDService(); // When var result = Record.Exception(() => appVeyor.GetHistory(null, "password")); // Then Assert.IsArgumentNullException(result, "username"); }
public void Should_Return_False_If_Not_Running_On_GoCD() { // Given var fixture = new GoCDFixture(); var gocd = fixture.CreateGoCDService(); // When var result = gocd.IsRunningOnGoCD; // Then Assert.False(result); }
public void Should_Return_Non_Null_Reference() { // Given var fixture = new GoCDFixture(); var gocd = fixture.CreateGoCDService(); // When var result = gocd.Environment; // Then Assert.NotNull(result); }
public void Should_Throw_If_Not_Running_On_GoCD() { // Given var fixture = new GoCDFixture(); var appVeyor = fixture.CreateGoCDService(); // When var result = Record.Exception(() => appVeyor.GetHistory("username", "password")); // Then Assert.IsExceptionWithMessage <CakeException>(result, "The current build is not running on Go.CD."); }