public void ProcessReleaseProfile_SingleProfilePreview()
        {
            var context = new Context();

            context.Parser.GetMarkdownData(ReleaseProfileType.Anime).Returns("theMarkdown");
            context.Config.ReleaseProfiles.Add(new ReleaseProfileConfig {
                Type = ReleaseProfileType.Anime
            });

            var logic = new ReleaseProfileUpdater(context.Logger, context.Parser, context.Api);

            logic.Process(context.Args, context.Config);

            context.Parser.Received().ParseMarkdown(context.Config.ReleaseProfiles[0], "theMarkdown");
        }
Ejemplo n.º 2
0
    public void ProcessReleaseProfile_SingleProfilePreview()
    {
        var context = new Context();

        context.Parser.GetMarkdownData(ReleaseProfileType.Anime).Returns("theMarkdown");
        var config = new SonarrConfiguration
        {
            ReleaseProfiles = new[] { new ReleaseProfileConfig {
                                          Type = ReleaseProfileType.Anime
                                      } }
        };

        var logic = new ReleaseProfileUpdater(context.Logger, context.Parser, context.Api, context.Compatibility);

        logic.Process(false, config);

        context.Parser.Received().ParseMarkdown(config.ReleaseProfiles[0], "theMarkdown");
    }