Files
speckle-sharp-sdk/tests/Speckle.Core.Tests.Integration/Api/GraphQL/Resources/ProjectInviteResourceExceptionalTests.cs
T
Adam Hathcock 200b84f49a Main to dev (#18)
* Add Instances base (#6)

* Use Uri for checks in GetAccounts function (#8)

* Add integration and perf tests to sln (#9)

* Remove perf tests (#10)

* remove perf tests

* do all unit tests

* Code coverage (#11)

* code coverage

* enable codecov for GA

* Update README.md

* Update coverage and dependencies (#12)

* Update coverage and dependencies

* fmt

* add codecov config

* merge DUI3/Alpha into sdk (#13)

* merge DUI3/Alpha into sdk

* formatting

* Merge Objects dui3/alpha -> dev (#14)

* merge DUI3/Alpha into sdk

* formatting

* Objects changes

* Objects tests

* Unit test project

* update codecov to be less intrusive (#15)

* update codecov to be less intrusive

* fix codecov yaml

* add coverage exclusion

* Merge sharp `dui3/alpha` -> sdk `main` (#16)

* Merge

* csharpier format

* Fixed polysharp issues

* Integration Tests

* Fixes

* Some nullability fixes (#17)

* add coverage exclusion

* fix some tests and fix nullability errors

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-07-09 13:56:03 +01:00

33 lines
1010 B
C#

using Speckle.Core.Api;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Resources;
namespace Speckle.Core.Tests.Integration.API.GraphQL.Resources;
[TestOf(typeof(ProjectInviteResource))]
public class ProjectInviteResourceExceptionalTests
{
private Client _testUser;
private Project _project;
private ProjectInviteResource Sut => _testUser.ProjectInvite;
[OneTimeSetUp]
public async Task Setup()
{
_testUser = await Fixtures.SeedUserWithClient();
_project = await _testUser.Project.Create(new("test", null, null));
}
[TestCase(null, null, null, null)]
[TestCase(null, "something", "something", null)]
public void ProjectInviteCreate_InvalidInput(string email, string role, string serverRole, string userId)
{
Assert.CatchAsync<SpeckleGraphQLException>(async () =>
{
var input = new ProjectInviteCreateInput(email, role, serverRole, userId);
await Sut.Create(_project.id, input);
});
}
}