Ejemplo n.º 1
0
        public void NavigationViewModel_SetNodeOverwrite_SetToFalse_FalseReturned()
        {
            Init(false, true);
            var newResource = new Mock <IContextualResourceModel>();

            newResource.Setup(r => r.ResourceType)
            .Returns(ResourceType.WorkflowService);
            newResource.Setup(r => r.Category).Returns("Testing");
            newResource.Setup(r => r.ResourceName).Returns("Cake");
            newResource.Setup(r => r.Environment)
            .Returns(_mockEnvironmentModel.Object);

            var updatemsg = new UpdateResourceMessage(newResource.Object);

            _vm.Handle(updatemsg);

            Assert.IsFalse(_vm.SetNodeOverwrite(newResource.Object, false));
        }