Beispiel #1
0
            public void Should_Set_PullRequestSystem()
            {
                // Given
                var log = new FakeLog();
                var pullRequestSystem = new FakePullRequestSystem(log);

                // When
                var capability = new FakePullRequestSystemCapability(log, pullRequestSystem);

                // Then
                capability.PullRequestSystem.ShouldBe(pullRequestSystem);
            }
Beispiel #2
0
            public void Should_Return_False_If_PullRequestSystem_Does_Not_Have_Capability()
            {
                // Given
                var log = new FakeLog();
                var pullRequestSystem = new FakePullRequestSystem(log);
                var capability        = new FakePullRequestSystemCapability(log, pullRequestSystem);

                // When
                pullRequestSystem.AddCapability(capability);

                // Then
                pullRequestSystem.HasCapability <FakeCheckingCommitIdCapability>().ShouldBeFalse();
            }
Beispiel #3
0
            public void Should_Return_True_If_PullRequestSystem_Has_Capability()
            {
                // Given
                var log = new FakeLog();
                var pullRequestSystem = new FakePullRequestSystem(log);
                var capability        = new FakePullRequestSystemCapability(log, pullRequestSystem);

                // When
                pullRequestSystem.AddCapability(capability);

                // Then
                pullRequestSystem.HasCapability <FakePullRequestSystemCapability>().ShouldBeTrue();
            }
Beispiel #4
0
            public void Should_Return_Null_If_Capability_Does_Not_Exist()
            {
                // Given
                var log = new FakeLog();
                var pullRequestSystem = new FakePullRequestSystem(log);
                var capability        = new FakePullRequestSystemCapability(log, pullRequestSystem);

                pullRequestSystem.AddCapability(capability);

                // When
                var result = pullRequestSystem.GetCapability <FakeCheckingCommitIdCapability>();

                // Then
                result.ShouldBeNull();
            }
Beispiel #5
0
            public void Should_Return_Capability_If_Capability_Exists()
            {
                // Given
                var log = new FakeLog();
                var pullRequestSystem = new FakePullRequestSystem(log);
                var capability        = new FakePullRequestSystemCapability(log, pullRequestSystem);

                pullRequestSystem.AddCapability(capability);

                // When
                var result = pullRequestSystem.GetCapability <FakePullRequestSystemCapability>();

                // Then
                result.ShouldBe(capability);
            }