Example #1
0
        public void OutputFormatter_Context_CanWrite_Test()
        {
            var context = GenerateOutputFormatterWriteContext(typeof(Address), null);
            var result  = _outputFormatter.CanWriteResult(context);

            result.ShouldBeFalse();

            var address = GenerateAddress();

            context = GenerateOutputFormatterWriteContext(typeof(Address), address, "application/x-protobuf");
            var result2 = _outputFormatter.CanWriteResult(context);

            result2.ShouldBeTrue();
        }