public void ShouldComposeScripts([Frozen] Mock <IFileSystem> fileSystem, Mock <IScriptLibraryComposer> composer) { var cmd = new ExecuteLooseScriptCommand( null, null, fileSystem.Object, new Mock <IScriptExecutor>().Object, new Mock <IScriptPackResolver>().Object, new TestLogProvider(), new Mock <IAssemblyResolver>().Object, composer.Object); cmd.Execute(); composer.Verify(c => c.Compose(It.IsAny <string>(), null)); }
public void MigratesTheFileSystem( [Frozen] Mock <IFileSystem> fileSystem, [Frozen] Mock <IFileSystemMigrator> fileSystemMigrator) { // arrange var sut = new ExecuteLooseScriptCommand( null, null, fileSystem.Object, new Mock <IScriptExecutor>().Object, new Mock <IScriptPackResolver>().Object, new TestLogProvider(), new Mock <IAssemblyResolver>().Object, fileSystemMigrator.Object, new Mock <IScriptLibraryComposer>().Object); // act sut.Execute(); // assert fileSystemMigrator.Verify(m => m.Migrate(), Times.Once); }