public void Should_Set_RepositorySettings() { // Given // When var result = new FakeIssueProviderFixture(); // Then result.RepositorySettings.ShouldNotBeNull(); }
public void Should_Set_Log() { // Given // When var result = new FakeIssueProviderFixture(); // Then result.Log.ShouldNotBeNull(); }
public void Should_Throw_If_RepositorySettings_Are_Null() { // Given var fixture = new FakeIssueProviderFixture { RepositorySettings = null, }; // When var result = Record.Exception(() => fixture.ReadIssues()); // Then result.IsInvalidOperationException("No repository settings set."); }
public void Should_Throw_If_Log_Is_Null() { // Given var fixture = new FakeIssueProviderFixture { Log = null, }; // When var result = Record.Exception(() => fixture.ReadIssues()); // Then result.IsInvalidOperationException("No log instance set."); }
public void Should_Return_Issues() { // Given var issue = IssueBuilder .NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo") .Create(); var fixture = new FakeIssueProviderFixture(new List <IIssue> { issue }); // When var result = fixture.ReadIssues(); // Then result.Count().ShouldBe(1); result.ShouldContain(issue); }