Exemplo n.º 1
0
        public async Task ReadFromProtoBufAsync_Generic_Test()
        {
            var content = new StreamProtoBufHttpContent();

            content.WriteObject(SimpleType.Create(), _typeModel);

            var model = await content.ReadFromProtoBufAsync <SimpleType>(_typeModel);

            model.Verify();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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();
        }