public void ShouldIgnoreNonThirdPartyAttributeDataEntries(ProtoBuf.Share.DataEntry.Types.Type dataEntryType) { var dataEntry = new DataEntry { Type = dataEntryType, Value = ByteString.CopyFromUtf8("value") }; Assert.IsNull(DataEntryConverter.ConvertDataEntry(dataEntry)); }
public void ShouldThrowExtraDataExceptionForInvalidProtobuf() { var dataEntry = new ProtoBuf.Share.DataEntry { Value = ByteString.CopyFromUtf8(",̆"), Type = DataEntry.Types.Type.ThirdPartyAttribute }; Assert.ThrowsException <ExtraDataException>(() => { DataEntryConverter.ConvertDataEntry(dataEntry); }); }