public Workspace GetWorkspace()
 {
     try
     {
         return(_structurizrClient.GetWorkspace(_workSpaceId));
     }
     catch (KeyNotFoundException ex)
     {
         throw new Exception("The Workspace is corrupt. Please delete &nd re-create.", ex);
     }
 }
 public void Test_GetWorkspace_ThrowsAnException_WhenTheWorkspaceIdIsNotValid()
 {
     try
     {
         _structurizrClient = new StructurizrClient("key", "secret");
         _structurizrClient.GetWorkspace(0);
         throw new TestFailedException();
     }
     catch (ArgumentException iae)
     {
         Assert.Equal("The workspace ID must be a positive integer.", iae.Message);
     }
 }
Exemple #3
0
 public Workspace GetWorkspace()
 {
     return(client.GetWorkspace(secrets.WorkspaceId));
 }