예제 #1
0
        public void VerifyUpdateOkExecute()
        {
            var vm = new ParameterSubscriptionDialogViewModel(this.parameterSubscription, this.thingTransaction, this.session.Object, true,
                                                              ThingDialogKind.Create, this.thingDialogNavigationService.Object, this.parameterClone);

            Assert.IsTrue(vm.OkCommand.CanExecute(null));
            vm.OkCommand.Execute(null);
            this.session.Verify(x => x.Write(It.IsAny <OperationContainer>()));
        }
예제 #2
0
        public void VerifyThatPropertiesArePopulated()
        {
            var vm = new ParameterSubscriptionDialogViewModel(this.parameterSubscription, this.thingTransaction, this.session.Object, true,
                                                              ThingDialogKind.Create, this.thingDialogNavigationService.Object, this.parameterClone);

            Assert.IsNotNull(vm.SelectedParameterType);
            Assert.IsNotNull(vm.SelectedOwner);
            Assert.AreEqual(1, vm.ValueSet.Count);
            Assert.AreEqual(1, vm.PossibleOwner.Count);
            var valueSet = vm.ValueSet.First();

            Assert.AreEqual("m1", valueSet.Manual);
            Assert.AreEqual("r", valueSet.Reference);
            Assert.AreEqual("-", valueSet.Computed);
            Assert.AreEqual(ParameterSwitchKind.REFERENCE, valueSet.Switch);
            Assert.AreEqual("r", valueSet.Value);
        }
예제 #3
0
        public void VerifyThatParameterlessContructorExists()
        {
            var dialogViewModel = new ParameterSubscriptionDialogViewModel();

            Assert.IsFalse(dialogViewModel.IsReadOnly);
        }