Ejemplo n.º 1
0
    public void PluginDescriptor_IsSame_IfRegistryReturns_NoPlugin()
    {
        var registryMock     = GetRegistryMock();
        var registry         = registryMock.Object;
        var pluginDescriptor = new PluginDescriptor("abc", "def", PluginType.Vst);
        var sut = new ParsedRecord(pluginDescriptor, "pp");

        var actual = sut.ResolveAliases(registry);

        actual.PluginDescriptor.Should().Be(pluginDescriptor);
    }
Ejemplo n.º 2
0
    public void PluginDescriptor_IsAdjusted_IfAliasIsRegistered_AndMatchesName()
    {
        var registryMock = GetRegistryMock();

        registryMock.SetupGet(m => m["fn"]).Returns(new PluginDescriptor("abc", "def", PluginType.Unknown));
        var registry = registryMock.Object;
        var sut      = new ParsedRecord(new PluginDescriptor("fn", "", PluginType.Vst), "pp");

        var actual = sut.ResolveAliases(registry);

        actual.PluginDescriptor.Should().Be(new PluginDescriptor("abc", "def", PluginType.Vst));
    }
Ejemplo n.º 3
0
    public void PluginDescriptor_IsSame_IfAliasNotRegistered()
    {
        var registryMock = new Mock <PluginRegistry> {
            CallBase = true
        };
        var registry         = registryMock.Object;
        var pluginDescriptor = new PluginDescriptor("abc", "def", PluginType.Vst);
        var sut = new ParsedRecord(pluginDescriptor, "pp");

        var actual = sut.ResolveAliases(registry);

        actual.PluginDescriptor.Should().Be(pluginDescriptor);
    }