public CreateWorkspace ( Api.Models.Workspace workspace ) : Api.Models.Workspace | ||
workspace | Api.Models.Workspace | the workspace To create |
Результат | Api.Models.Workspace |
public virtual void TestCreateWorkspace() { server.setResponseBody("../../../TestSDK/resources/createWorkspace.json"); Workspace workspace = new Workspace.CreateWorkspaceBuilder("New workspace").Build(); Workspace newWorkspace = workspaceResources.CreateWorkspace(workspace); Assert.AreEqual(7960873114331012, (long)newWorkspace.Id); Assert.AreEqual("New workspace", newWorkspace.Name); Assert.AreEqual(AccessLevel.OWNER, newWorkspace.AccessLevel); Assert.AreEqual("https://app.smartsheet.com/b/home?lx=rBU8QqUVPCJ3geRgl7L8yQ", newWorkspace.Permalink); }
public virtual void TestCreateWorkspace() { server.setResponseBody("../../../TestSDK/resources/createWorkspace.json"); Workspace workspace = new Workspace(); workspace.Name = "New Workspace"; Workspace newWorkspace = workspaceResources.CreateWorkspace(workspace); Assert.AreEqual(2349499415848836L, (long)newWorkspace.ID); Assert.AreEqual("New Workspace", newWorkspace.Name); Assert.AreEqual(AccessLevel.OWNER, newWorkspace.AccessLevel); Assert.AreEqual("https://app.smartsheet.com/b/home?lx=Jasdfa", newWorkspace.Permalink); }