Example #1
0
        public void VerifyOkExecuteWhenNotTopElement()
        {
            var name      = "name";
            var shortname = "shortname";

            this.elementDefinition.Name      = name;
            this.elementDefinition.ShortName = shortname;
            this.elementDefinition.Owner     = this.domainOfExpertise;

            var elementDefinitionDialogViewModel = new ElementDefinitionDialogViewModel(this.elementDefinition, this.thingTransaction, this.session.Object, true, ThingDialogKind.Update, this.thingDialogNavigationService.Object, this.iterationClone);

            elementDefinitionDialogViewModel.OkCommand.Execute(null);

            this.session.Verify(x => x.Write(It.IsAny <OperationContainer>()));
        }
        public void VerifyThatPropertiesAreSet()
        {
            var name      = "name";
            var shortname = "shortname";

            this.elementDefinition.Name      = name;
            this.elementDefinition.ShortName = shortname;
            this.elementDefinition.Owner     = this.domainOfExpertise;

            var elementDefinitionDialogViewModel = new ElementDefinitionDialogViewModel(this.elementDefinition, this.thingTransaction, this.session.Object, true, ThingDialogKind.Create, this.thingDialogNavigationService.Object, this.iterationClone);

            Assert.AreEqual(name, elementDefinitionDialogViewModel.Name);
            Assert.AreEqual(shortname, elementDefinitionDialogViewModel.ShortName);
            Assert.AreEqual(this.domainOfExpertise, elementDefinitionDialogViewModel.SelectedOwner);
            Assert.AreSame(this.iterationClone, elementDefinitionDialogViewModel.Container);
            Assert.IsFalse(elementDefinitionDialogViewModel.IsTopElement);
            Assert.IsTrue(elementDefinitionDialogViewModel.PossibleCategory.Any());
        }
        public void VerifyThatDefaultConstructorIsAvailable()
        {
            var elementDefinitionDialogViewModel = new ElementDefinitionDialogViewModel();

            Assert.IsNotNull(elementDefinitionDialogViewModel);
        }