public void VerifyThatPropertiesAreSet() { var shortname = "new shortname"; var name = "new name"; var isdeprecated = true; var simpleUnit = new SimpleUnit(Guid.NewGuid(), null, null); var vm = new SimpleUnitDialogViewModel(simpleUnit, this.transaction, this.session.Object, true, ThingDialogKind.Inspect, this.dialogService.Object, this.genericSiteReferenceDataLibrary); Assert.IsFalse(vm.OkCommand.CanExecute(null)); vm.ShortName = shortname; vm.Name = name; vm.IsDeprecated = isdeprecated; vm.Container = this.genericSiteReferenceDataLibrary; Assert.IsTrue(vm.OkCommand.CanExecute(null)); }
public void VerifyThatParameterlessContructorExists() { var dialogViewModel = new SimpleUnitDialogViewModel(); Assert.IsFalse(dialogViewModel.IsDeprecated); }