コード例 #1
0
ファイル: MainViewModelTest.cs プロジェクト: Robin--/Warewolf
        private void AddAdditionalContext()
        {
            _secondResource = new Mock<IContextualResourceModel>();

            _secondResource.Setup(c => c.ResourceName).Returns("WhoCares");
            _secondResource.Setup(c => c.ResourceType).Returns(ResourceType.WorkflowService);
            _secondResource.Setup(c => c.ServiceDefinition).Returns("");
            _secondResource.Setup(c => c.Category).Returns("Testing2");
            _secondResource.Setup(c => c.Environment).Returns(_environmentModel.Object);
            _secondResource.Setup(c => c.ServerID).Returns(_serverID);
            _secondResource.Setup(c => c.ID).Returns(_secondResourceID);

            var msg = new AddWorkSurfaceMessage(_secondResource.Object);
            _mainViewModel.Handle(msg);
        }
コード例 #2
0
 protected void AddAdditionalContext()
 {
     SecondResource = new Mock<IContextualResourceModel>();
     SecondResource.Setup(c => c.ResourceName).Returns("WhoCares");
     SecondResource.Setup(c => c.ResourceType).Returns(ResourceType.WorkflowService);
     SecondResource.Setup(c => c.WorkflowXaml).Returns(new StringBuilder());
     SecondResource.Setup(c => c.Category).Returns("Testing2");
     SecondResource.Setup(c => c.Environment).Returns(EnvironmentModel.Object);
     SecondResource.Setup(c => c.ServerID).Returns(ServerId);
     SecondResource.Setup(c => c.ID).Returns(SecondResourceId);
     SecondResource.Setup(c => c.UserPermissions).Returns(Permissions.Contribute);
     var msg = new AddWorkSurfaceMessage(SecondResource.Object);
     MainViewModel.Handle(msg);
 }