public void DecodeBinary_NoData()
        {
            var cloudEvent = CreateSampleEvent();

            var converter = new ProtobufJsonCloudEventFormatter <StorageObjectData>();

            converter.DecodeBinaryModeEventData(new byte[0], cloudEvent);
            Assert.Null(cloudEvent.Data);
        }
        public void DecodeBinary()
        {
            var bytes        = TestResourceHelper.LoadBytes("binary-mode-body.json");
            var cloudEvent   = CreateSampleEvent();
            var expectedData = cloudEvent.Data;

            cloudEvent.Data = null;

            var converter = new ProtobufJsonCloudEventFormatter <StorageObjectData>();

            converter.DecodeBinaryModeEventData(bytes, cloudEvent);
            var actualData = cloudEvent.Data;

            Assert.Equal(expectedData, actualData);
        }