public void Manufacturer_IsAdjusted_IfAliasIsRegistered()
    {
        var registry = Mock.Of <IPluginRegistry>(m => m["fn"] == new PluginDescriptor("abc", "def", PluginType.Unknown));
        var sut      = new PluginDescriptor("fn", "", PluginType.Vst);

        var pi     = sut.ResolveAliases(registry);
        var actual = pi.Manufacturer;

        actual.Should().Be("def");
    }
    public void ResolvingAlias_WhenCandidateInstance_HasManufacturerInName()
    {
        var p1       = new PluginDescriptor("abc", "def", PluginType.Unknown);
        var registry = Mock.Of <IPluginRegistry>(m =>
                                                 m["def abc"] == p1);
        var sut = new PluginDescriptor("def abc", "", PluginType.Vst);

        var actual = sut.ResolveAliases(registry);

        actual.Should().Be(new PluginDescriptor("abc", "def", PluginType.Vst));
    }
    public void PluginType_IsTaken_FromCandidateInstance()
    {
        var expected = PluginType.Vst;

        var registry = Mock.Of <IPluginRegistry>(m => m["fn"] == new PluginDescriptor("abc", "def", PluginType.Unknown));
        var sut      = new PluginDescriptor("fn", "", expected);

        var pi = sut.ResolveAliases(registry);

        var actual = pi.PluginType;

        actual.Should().Be(expected);
    }
    public void PluginDescriptor_IsSame_IfAliasNotRegistered()
    {
        var registryMock = new Mock <PluginRegistry> {
            CallBase = true
        };
        var registry = registryMock.Object;
        var sut      = new PluginDescriptor("abc", "def", PluginType.Vst);

        var actual = sut.ResolveAliases(registry);

        var expected = new PluginDescriptor("abc", "def", PluginType.Vst);

        actual.Should().Be(expected);
    }