public void Can_ignore_unexpected_data() { var address2 = new AddressV2 { City = "New York", Country = "USA", Street = "Jr. Someone" }; byte[] serialized = MessagePackSerializer.Serialize(address2, StandardResolver.Instance); var deserialized = MessagePackSerializer.Deserialize <AddressV1>(serialized, StandardResolver.Instance); deserialized.Street.Should().Be(address2.Street); deserialized.City.Should().Be(address2.City); }
public async Task TestGetCorrespondenceAddress() { // Perform API call AddressV2 result = null; try { result = await _controller.GetCorrespondenceAddressAsync(); } catch (APIException) {}; // Test response code Assert.AreEqual(200, HTTPCallBackHandler.Response.StatusCode, "Status should be 200"); // Test headers var headers = new Dictionary <string, string>(); headers.Add("Content-Type", "application/json"); Assert.IsTrue(TestHelper.AreHeadersProperSubsetOf( headers, HTTPCallBackHandler.Response.Headers), "Headers should match"); }