Exemple #1
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();
            }
Exemple #2
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);
            }