Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code generator #129

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Nakama.Tests/HttpErrorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* limitations under the License.
*/

using System.Collections.Generic;
using Nakama.TinyJson;

namespace Nakama.Tests.Api
{
using System;
Expand Down Expand Up @@ -46,7 +49,8 @@ public async Task BadLuaRpcReturnsErrorMessageAndDict()
await Assert.ThrowsAsync<ApiResponseException>(() => _client.RpcAsync(session, funcid));
Assert.NotNull(exception.Message);
Assert.NotEmpty(exception.Message);
Assert.Equal("Some error occured.", exception.Message);
var decoded = exception.Message.FromJson<Dictionary<string, object>>();
Assert.Equal("Some error occured.", decoded["message"]);
}

[Fact(Skip = "requires go plugin")]
Expand Down
4 changes: 2 additions & 2 deletions Nakama.Tests/LinkUnlinkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public async Task ShouldNotUnlinkSteam()
var session = await _client.AuthenticateCustomAsync(customid);

var ex = await Assert.ThrowsAsync<ApiResponseException>(() => _client.UnlinkSteamAsync(session, "invalid"));
Assert.Equal((int) HttpStatusCode.BadRequest, ex.StatusCode);
Assert.Equal((int) HttpStatusCode.Unauthorized, ex.StatusCode);
}

[Fact(Timeout = TestsUtil.TIMEOUT_MILLISECONDS)]
Expand All @@ -411,7 +411,7 @@ public async Task ShouldNotUnlinkApple()
var session = await _client.AuthenticateCustomAsync(customid);

var ex = await Assert.ThrowsAsync<ApiResponseException>(() => _client.UnlinkAppleAsync(session, "invalid"));
Assert.Equal((int) HttpStatusCode.BadRequest, ex.StatusCode);
Assert.Equal((int) HttpStatusCode.Unauthorized, ex.StatusCode);
}
}
}
1 change: 0 additions & 1 deletion Nakama.Tests/RpcTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class RpcTest
public RpcTest()
{
_client = TestsUtil.FromSettingsFile();

}

[Fact(Timeout = TestsUtil.TIMEOUT_MILLISECONDS)]
Expand Down
1 change: 1 addition & 0 deletions Nakama.Tests/Socket/WebSocketTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

using System;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand Down
Loading