public void Do_not_export_unexportable() { var canExport = false; shell.CanExport.Changed().Subscribe(_ => canExport = shell.CanExport.Value); var export = new ExportScreen(); export.CanExport.Value = true; shell.ActivateItem(export); Assert.IsTrue(canExport); shell.ActivateItem(new Screen()); Assert.IsFalse(canExport); }
public void Track_can_export_changes() { var canExport = false; shell.CanExport.Changed().Subscribe(_ => canExport = shell.CanExport.Value); var export = new ExportScreen(); shell.ActivateItem(export); export.CanExport.Value = true; Assert.IsTrue(canExport); }