Skip to content

Commit

Permalink
test: Custom base URLs unit test (box/box-codegen#452) (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build authored Mar 25, 2024
1 parent a1e4c4b commit da821ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "3970588", "specHash": "d50ab5f", "version": "0.3.0" }
{ "engineHash": "0d4bf53", "specHash": "d50ab5f", "version": "0.3.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using StringExtensions;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System;
using Box.Sdk.Gen;
using Box.Sdk.Gen.Schemas;
using Box.Sdk.Gen.Managers;
Expand Down Expand Up @@ -45,5 +46,12 @@ public async System.Threading.Tasks.Task TestWithExtraHeaders() {
await client.Users.DeleteUserByIdAsync(userId: createdUser.Id);
}

[TestMethod]
public async System.Threading.Tasks.Task TestWithCustomBaseUrls() {
BaseUrls newBaseUrls = new BaseUrls(baseUrl: "https://box.com/", uploadUrl: "https://box.com/", oauth2Url: "https://box.com/");
BoxClient customBaseClient = client.WithCustomBaseUrls(baseUrls: newBaseUrls);
await Assert.That.IsExceptionAsync(async() => await customBaseClient.Users.GetUserMeAsync());
}

}
}

0 comments on commit da821ad

Please sign in to comment.