コード例 #1
0
        public void DefaultContentType()
        {
            var properties = new BasicProperties();

            Assert.Equal(SerializationConfiguration.DefaultContentType,
                         properties.ContentTypeOrDefault());
        }
コード例 #2
0
ファイル: MessageProperties.cs プロジェクト: pichierri/Carrot
 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
ファイル: MessageProperties.cs プロジェクト: naighes/Carrot
 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
ファイル: MessageProperties.cs プロジェクト: pichierri/Carrot
 public void DefaultContentType()
 {
     var properties = new BasicProperties();
     Assert.Equal(SerializationConfiguration.DefaultContentType,
                  properties.ContentTypeOrDefault());
 }