public void DefaultContentType() { var properties = new BasicProperties(); Assert.Equal(SerializationConfiguration.DefaultContentType, properties.ContentTypeOrDefault()); }
public void ReadingRabbitContentType() { const String contentType = "application/custom"; var properties = new BasicProperties { ContentType = contentType }; Assert.Equal(contentType, properties.ContentTypeOrDefault()); }
public void HeadersFallbackContentType() { const String contentType = "application/custom"; const String contentEncoding = "UTF-8"; var encoding = Encoding.GetEncoding(contentEncoding); var properties = new BasicProperties { ContentEncoding = contentEncoding, Headers = new Dictionary<String, Object> { { "Content-Type", encoding.GetBytes(contentType) } } }; Assert.Equal(contentType, properties.ContentTypeOrDefault()); }
public void HeadersFallbackContentType() { const String contentType = "application/custom"; const String contentEncoding = "UTF-8"; var encoding = Encoding.GetEncoding(contentEncoding); var properties = new BasicProperties { ContentEncoding = contentEncoding, Headers = new Dictionary <String, Object> { { "Content-Type", encoding.GetBytes(contentType) } } }; Assert.Equal(contentType, properties.ContentTypeOrDefault()); }