public void WriteOldReadNew(ContextFixtureBase fixture) { var expected = CreateTestObject(); var actual = MsgPackSerializer.Deserialize <ImageInfo>(MsgPackSerializer.Serialize(expected, fixture.OldContext), fixture.NewContext); AssertEqual(actual, expected); }
public void ReadSmoke(ContextFixtureBase fixture) { IImageInfo expected = CreateTestObject(); var actual = MsgPackSerializer.Deserialize <IImageInfo>(MsgPackSerializer.Serialize(expected, fixture.NewContext), fixture.NewContext); AssertEqual(actual, expected); }
public void DescendantConverterCanUseAscendant(ContextFixtureBase fixture) { IImageInfo expected = CreateTestObject(); var actual = MsgPackSerializer.Deserialize <IMegaImageInfo>(MsgPackSerializer.Serialize(expected, fixture.OldContext), fixture.NewContext); actual.ShouldBeAssignableTo <IMegaImageInfo>(); AssertEqual(actual, expected); }
public void WriteSmoke(ContextFixtureBase fixture) { var testObject = new BigImageInfo { Credits = Guid.NewGuid().ToString("N"), Height = 123, Link = Guid.NewGuid().ToString("N"), Size = 234, Width = 345 }; MsgPackSerializer.Serialize(testObject, fixture.NewContext).ShouldBe(MsgPackSerializer.Serialize(testObject, fixture.OldContext)); }
public void InterfaceInheritance(ContextFixtureBase fixture) { IMegaImageInfo expected = new MegaImageInfo { Credits = Guid.NewGuid().ToString("N"), Height = 123, Link = Guid.NewGuid().ToString("N"), SomeDate = DateTime.UtcNow, Width = 345 }; var actual = MsgPackSerializer.Deserialize <IMegaImageInfo>(MsgPackSerializer.Serialize(expected, fixture.OldContext), fixture.NewContext); actual.ShouldBeAssignableTo <IMegaImageInfo>(); AssertEqual(actual, expected); }
public void WriteSmoke(ContextFixtureBase fixture) { var testObject = CreateTestObject(); MsgPackSerializer.Serialize(testObject, fixture.NewContext).ShouldBe(MsgPackSerializer.Serialize(testObject, fixture.OldContext)); }