public void FindBuildPluginShouldReturnNullWhenPluginWasNotFound()
        {
            // Arrange
            var sut = new PluginRepository(System.Array.Empty <IBuildPlugin>(), System.Array.Empty <ISourceControlPlugin>(), System.Array.Empty <INotificationProcessor>(), Substitute.For <ITypeMatcher>());

            // Act
            var actual = sut.FindBuildPlugin("non.existing");

            // Assert
            Assert.Null(actual);
        }
        public void FindBuildPluginShouldFindPluginWhenExisting()
        {
            // Arrange
            var buildPlugins = new[]
            {
                Substitute.For <IBuildPlugin>()
            };

            var typeMatcher = Substitute.For <ITypeMatcher>();

            typeMatcher.MatchesType(buildPlugins[0].GetType(), "typeName").Returns(true);

            var sut = new PluginRepository(buildPlugins, System.Array.Empty <ISourceControlPlugin>(), System.Array.Empty <INotificationProcessor>(), typeMatcher);

            // Act
            var actual = sut.FindBuildPlugin("typeName");

            // Assert
            Assert.NotNull(actual);
        }