public void CanHandleInternalServerErrorHttpStatusWorldMetadataResponse() { MockHttpMessageHandler.SetResponse(string.Empty, HttpStatusCode.InternalServerError); var api = new WorldApi(); var result = api.GetMetadata("some world id").Result; result.Should().BeNull(); }
public void CanHandleValidWorldMetadataResponse() { MockHttpMessageHandler.SetResponse(new JObject( new JProperty("id", "some world id"), new JProperty("metadata", new JObject()))); var api = new WorldApi(); var result = api.GetMetadata("some world id").Result; result.id.Should().Be("some world id"); result.metadata.Should().BeEmpty(); }