示例#1
0
            public void Should_Set_RepositorySettings()
            {
                // Given

                // When
                var result = new FakeIssueProviderFixture();

                // Then
                result.RepositorySettings.ShouldNotBeNull();
            }
示例#2
0
            public void Should_Set_Log()
            {
                // Given

                // When
                var result = new FakeIssueProviderFixture();

                // Then
                result.Log.ShouldNotBeNull();
            }
示例#3
0
            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.");
            }
示例#4
0
            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.");
            }
示例#5
0
            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);
            }