public void Component_ObjectContainsDictionaryAndMap_ResultIsTheSameAsInput() { //Arrange BiggerNestedTestClass testClass = _fixture.Create <BiggerNestedTestClass>(); //Act var result = AvroConvert.Serialize(testClass); var deserialized = AvroConvert.Deserialize <BiggerNestedTestClass>(result); //Assert Assert.NotNull(result); Assert.NotNull(deserialized); Assert.Equal(testClass, deserialized); }
public void Deflate_SerializeAndDeserializeComplexClass_NoError() { //Arrange BiggerNestedTestClass toSerialize = _fixture.Create <BiggerNestedTestClass>(); //Act var result = AvroConvert.Serialize(toSerialize, CodecType.Deflate); var deserialized = AvroConvert.Deserialize <BiggerNestedTestClass>(result); //Assert Assert.NotNull(result); Assert.NotNull(deserialized); Assert.Equal(toSerialize, deserialized); }
public void Component_SerializeBiggerObjectAndReadSmaller_NoError() { //Arrange BiggerNestedTestClass toSerialize = _fixture.Create <BiggerNestedTestClass>(); //Act var result = AvroConvert.Serialize(toSerialize); var deserialized = AvroConvert.Deserialize <NestedTestClass>(result); //Assert Assert.NotNull(result); Assert.NotNull(deserialized); Assert.Equal(toSerialize.justSomeProperty, deserialized.justSomeProperty); Assert.Equal(toSerialize.andLongProperty, deserialized.andLongProperty); }