public void ParsesFieldNameAndValue(string data, string expectedName, string expectedValue) { var result1 = EventParser.ParseLineString(data); Assert.Equal(expectedName, result1.FieldName); Assert.Equal(expectedValue, result1.ValueString); Assert.Equal(expectedValue, result1.GetValueAsString()); var result2 = EventParser.ParseLineUtf8Bytes(ToBytes(data)); Assert.Equal(expectedName, result2.FieldName); Assert.Null(result2.ValueString); Assert.True(new Utf8ByteSpan(expectedValue).Equals(result2.ValueBytes)); Assert.Equal(expectedValue, result2.GetValueAsString()); }
public void IsCommentIsFalseForNonComment(string data) { Assert.False(EventParser.ParseLineString(data).IsComment); Assert.False(EventParser.ParseLineUtf8Bytes(ToBytes(data)).IsComment); }
public void IsCommentIsTrueForComment(string data) { Assert.True(EventParser.ParseLineString(data).IsComment); Assert.True(EventParser.ParseLineUtf8Bytes(ToBytes(data)).IsComment); }