Ejemplo n.º 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);
            }
Ejemplo n.º 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();
            }
Ejemplo n.º 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();
            }
Ejemplo n.º 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();
            }
Ejemplo n.º 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);
            }