Execute() public method

public Execute ( StringBuilder>.Dictionary values, IWorkspace theWorkspace ) : StringBuilder
values StringBuilder>.Dictionary
theWorkspace IWorkspace
return StringBuilder
 public void MoveItem_Execute_NullValues_ErrorResult()
 {
     //------------Setup for test--------------------------
     var MoveItemService = new MoveItemService();
     var serializer = new Dev2JsonSerializer();
     //------------Execute Test---------------------------
     StringBuilder jsonResult = MoveItemService.Execute(null, null);
     IExplorerRepositoryResult result = serializer.Deserialize<IExplorerRepositoryResult>(jsonResult);
     //------------Assert Results-------------------------
     Assert.AreEqual(ExecStatus.Fail, result.Status);
 }
 public void MoveItem_Execute_ItemToRenameNotInValues_ErrorResult()
 {
     //------------Setup for test--------------------------
     var values = new Dictionary<string, StringBuilder> { { "item", new StringBuilder() } };
     var MoveItemService = new MoveItemService();
     var serializer = new Dev2JsonSerializer();
     //------------Execute Test---------------------------
     StringBuilder jsonResult = MoveItemService.Execute(values, null);
     IExplorerRepositoryResult result = serializer.Deserialize<IExplorerRepositoryResult>(jsonResult);
     //------------Assert Results-------------------------
     Assert.AreEqual(ExecStatus.Fail, result.Status);
 }
        public void MoveItem_Execute_ExpectRename()
        {
            //------------Setup for test--------------------------
            var MoveItemService = new MoveItemService();

            ServerExplorerItem item = new ServerExplorerItem("a", Guid.NewGuid(), ResourceType.Folder, null, Permissions.DeployFrom, "");
            var repo = new Mock<IExplorerServerResourceRepository>();
            var ws = new Mock<IWorkspace>();
            repo.Setup(a => a.MoveItem(It.IsAny<IExplorerItem>(), It.IsAny<string>(), It.IsAny<Guid>())).Returns(new ExplorerRepositoryResult(ExecStatus.Success, "")).Verifiable();

            var serializer = new Dev2JsonSerializer();
            var inputs = new Dictionary<string, StringBuilder>
                {
                    {
                        "itemToMove", serializer.SerializeToBuilder(item)
                    },
                    {
                        "newPath", new StringBuilder("bob")
                    }
                };
            ws.Setup(a => a.ID).Returns(Guid.Empty);
            MoveItemService.ServerExplorerRepo = repo.Object;
            //------------Execute Test---------------------------
            MoveItemService.Execute(inputs, ws.Object);
            //------------Assert Results-------------------------
            repo.Verify(a => a.MoveItem(It.IsAny<IExplorerItem>(), It.IsAny<string>(), It.IsAny<Guid>()));
        }