예제 #1
0
        public void DefaultContentType()
        {
            var properties = new BasicProperties();

            Assert.Equal(SerializationConfiguration.DefaultContentType,
                         properties.ContentTypeOrDefault());
        }
예제 #2
0
 public void ReadingRabbitContentType()
 {
     const String contentType = "application/custom";
     var properties = new BasicProperties
                          {
                              ContentType = contentType
                          };
     Assert.Equal(contentType, properties.ContentTypeOrDefault());
 }
예제 #3
0
        public void ReadingRabbitContentType()
        {
            const String contentType = "application/custom";
            var          properties  = new BasicProperties
            {
                ContentType = contentType
            };

            Assert.Equal(contentType, properties.ContentTypeOrDefault());
        }
예제 #4
0
 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());
 }
예제 #5
0
        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());
        }
예제 #6
0
 public void DefaultContentType()
 {
     var properties = new BasicProperties();
     Assert.Equal(SerializationConfiguration.DefaultContentType,
                  properties.ContentTypeOrDefault());
 }