public RoslynScriptEngine( RoslynScriptSessionFactory stableFactory, RoslynNightlyScriptSessionFactory nightlyFactory, ICakeLog log) { _nightlyFactory = nightlyFactory; _stableFactory = stableFactory; _log = log; }
public void Should_Install_Roslyn_If_Not_Installed() { // Given var log = Substitute.For <ICakeLog>(); var installer = Substitute.For <IRoslynInstaller>(); installer.IsInstalled(Arg.Any <DirectoryPath>()).Returns(false); var environment = Substitute.For <ICakeEnvironment>(); var factory = new RoslynScriptSessionFactory(environment, installer, log); // When factory.Initialize(); // Then installer.Received(1).Install(Arg.Any <DirectoryPath>()); }