public void TestCommand() { _IWebServicesSettings = Substitute.For<IDiscogsAuthentificationProvider>(); _Infra = Substitute.For<IInfraDependencies>(); FileSystem fs = new FileSystem(); _Infra.File.Returns(fs); _Target = new ExportKeyViewModel(_IWebServicesSettings, _Infra); ICommand com = _Target.Commit; com.MonitorEvents(); com.Should().NotBeNull(); com.CanExecute(null).Should().BeTrue(); com.ShouldNotRaise("CanExecuteChanged"); _Target.Directory = "24"; com.CanExecute(null).Should().BeFalse(); com.ShouldRaise("CanExecuteChanged"); _Target.Directory = @"C:\"; com.CanExecute(null).Should().BeTrue(); com.ShouldRaise("CanExecuteChanged"); }
internal CurrentInfraTools(IMusicFactory imf) { _Zipper = new SevenZipZipper(); _Filer = new FileSystem(); _MusicFactory = imf; }