public async Task ReadFromProtoBufAsync_Generic_Test() { var content = new StreamProtoBufHttpContent(); content.WriteObject(SimpleType.Create(), _typeModel); var model = await content.ReadFromProtoBufAsync <SimpleType>(_typeModel); model.Verify(); }
public async Task ReadFromProtoBufAsync_Generic_NullObject_Test() { var content = new StreamProtoBufHttpContent(); content.WriteObject <SimpleType>(null !, _typeModel); var model = await content.ReadFromProtoBufAsync <SimpleType>(_typeModel); Assert.Null(model); }
public async Task ReadFromProtoBufAsync_Test() { var content = new StreamProtoBufHttpContent(); content.WriteObject(SimpleType.Create(), _typeModel); var model = await content.ReadFromProtoBufAsync(typeof(SimpleType), _typeModel); var simpleType = Assert.IsType <SimpleType>(model); simpleType.Verify(); }