public void GetLast_Throws_On_InvalidKey() { var headers = new KafkaEventDataHeaders(); headers.Add("test", Encoding.UTF8.GetBytes("testValue1")); Assert.Throws <KeyNotFoundException>(() => headers.GetLast("test2")); }
public void GetLast_Returns_The_Last_Header_Value() { var headers = new KafkaEventDataHeaders(); headers.Add("test", Encoding.UTF8.GetBytes("testValue1")); headers.Add("test", Encoding.UTF8.GetBytes("testValue2")); var value = headers.GetLast("test"); Assert.Equal("testValue2", Encoding.UTF8.GetString(value)); }