public void WhenNoGhostscriptFound_ReturnsError()
        {
            var gsDiscovery = Substitute.For <IGhostscriptDiscovery>();

            gsDiscovery.GetGhostscriptInstance().Returns((GhostscriptVersion)null);

            var ghostscriptCondition = new GhostscriptCondition(gsDiscovery, new SectionNameTranslator());

            var result = ghostscriptCondition.Check();

            Assert.IsFalse(result.IsSuccessful);
            Assert.AreEqual((int)ExitCode.GhostScriptNotFound, result.ExitCode);
        }
        public void WhenGhostscriptFound_Successful()
        {
            var gsDiscovery = Substitute.For <IGhostscriptDiscovery>();

            gsDiscovery.GetGhostscriptInstance().Returns(new GhostscriptVersion("", "", ""));

            var ghostscriptCondition = new GhostscriptCondition(gsDiscovery, new SectionNameTranslator());

            var result = ghostscriptCondition.Check();

            Assert.IsTrue(result.IsSuccessful);
            Assert.AreEqual((int)ExitCode.Ok, result.ExitCode);
        }