コード例 #1
0
        private static void UpdateWorkspace(SmartsheetClient smartsheet, long workspaceId)
        {
            Workspace workspace = new Workspace.UpdateWorkspaceBuilder(workspaceId, "updated workspace").Build();

            Workspace updatedWorkspace = smartsheet.WorkspaceResources.UpdateWorkspace(workspace);

            Assert.IsTrue(updatedWorkspace.Name == "updated workspace");
        }
コード例 #2
0
        public virtual void TestUpdateWorkspace()
        {
            server.setResponseBody("../../../TestSDK/resources/updateWorkspace.json");

            Workspace workspace    = new Workspace.UpdateWorkspaceBuilder(32434534, "Updated workspace").Build();
            Workspace newWorkspace = workspaceResources.UpdateWorkspace(workspace);

            Assert.AreEqual(7960873114331012, (long)newWorkspace.Id);
            Assert.AreEqual("Updated workspace", newWorkspace.Name);
            Assert.AreEqual(AccessLevel.OWNER, newWorkspace.AccessLevel);
            Assert.AreEqual("https://app.smartsheet.com/b/home?lx=rBU8QqUVPCJ3geRgl7L8yQ", newWorkspace.Permalink);
        }