Skip to content

Commit

Permalink
Split test cases of project api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
aviadl committed Apr 7, 2024
1 parent 8c57656 commit eecfebb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Descope.Test/IntegrationTests/Management/ProjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ public async Task Project_ExportImport()
await _descopeClient.Management.Project.Import(imported_project);
}

[Fact(Skip = "Test fails due to theme import")]
public async Task Project_CloneRenameDelete()
public async Task Project_Rename()

Check warning on line 16 in Descope.Test/IntegrationTests/Management/ProjectTests.cs

View workflow job for this annotation

GitHub Actions / test

Public method 'Project_Rename' on test class 'ProjectTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 16 in Descope.Test/IntegrationTests/Management/ProjectTests.cs

View workflow job for this annotation

GitHub Actions / test

Public method 'Project_Rename' on test class 'ProjectTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 16 in Descope.Test/IntegrationTests/Management/ProjectTests.cs

View workflow job for this annotation

GitHub Actions / test

Public method 'Project_Rename' on test class 'ProjectTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 16 in Descope.Test/IntegrationTests/Management/ProjectTests.cs

View workflow job for this annotation

GitHub Actions / test

Public method 'Project_Rename' on test class 'ProjectTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
var name = Guid.NewGuid().ToString().Split("-").First();
// Rename
var new_name = Guid.NewGuid().ToString().Split("-").First();
await _descopeClient.Management.Project.Rename(new_name);

// Rename again so we will have original name
await _descopeClient.Management.Project.Rename("Dotnet SDK Testing");
}

[Fact(Skip = "Skipping due to lack of mgmt key permissions")]
public async Task Project_CloneAndDelete()
{
// Clone the current project
var name = Guid.NewGuid().ToString().Split("-").First();
Expand All @@ -23,13 +34,6 @@ public async Task Project_CloneRenameDelete()

// Delete cloned project
await _descopeClient.Management.Project.Delete(result.ProjectId);

// Rename
var new_name = Guid.NewGuid().ToString().Split("-").First();
await _descopeClient.Management.Project.Rename(new_name);

// Rename again so we will have original name
await _descopeClient.Management.Project.Rename("dotnet");
}

}
Expand Down

0 comments on commit eecfebb

Please sign in to comment.