@@ -37,115 +37,61 @@ class TestingBasicProperties : IBasicProperties
3737
3838 DeliveryModes IReadOnlyBasicProperties . DeliveryMode => throw new NotImplementedException ( ) ;
3939
40- public void ClearAppId ( )
41- {
42- throw new NotSupportedException ( ) ;
43- }
40+ public void ClearAppId ( ) => throw new NotSupportedException ( ) ;
4441
45- public void ClearClusterId ( )
46- {
47- throw new NotSupportedException ( ) ;
48- }
42+ public void ClearClusterId ( ) => throw new NotSupportedException ( ) ;
4943
50- public void ClearContentEncoding ( )
51- {
52- throw new NotSupportedException ( ) ;
53- }
44+ public void ClearContentEncoding ( ) => throw new NotSupportedException ( ) ;
5445
55- public void ClearContentType ( )
56- {
57- throw new NotSupportedException ( ) ;
58- }
46+ public void ClearContentType ( ) => throw new NotSupportedException ( ) ;
5947
60- public void ClearCorrelationId ( )
61- {
62- throw new NotSupportedException ( ) ;
63- }
48+ public void ClearCorrelationId ( ) => throw new NotSupportedException ( ) ;
6449
65- public void ClearDeliveryMode ( )
66- {
67- throw new NotSupportedException ( ) ;
68- }
50+ public void ClearDeliveryMode ( ) => throw new NotSupportedException ( ) ;
6951
70- public void ClearExpiration ( )
71- {
72- throw new NotSupportedException ( ) ;
73- }
52+ public void ClearExpiration ( ) => throw new NotSupportedException ( ) ;
7453
75- public void ClearHeaders ( )
76- {
77- throw new NotSupportedException ( ) ;
78- }
54+ public void ClearHeaders ( ) => throw new NotSupportedException ( ) ;
7955
80- public void ClearMessageId ( )
81- {
82- throw new NotSupportedException ( ) ;
83- }
56+ public void ClearMessageId ( ) => throw new NotSupportedException ( ) ;
8457
85- public void ClearPriority ( )
86- {
87- throw new NotSupportedException ( ) ;
88- }
58+ public void ClearPriority ( ) => throw new NotSupportedException ( ) ;
8959
90- public void ClearReplyTo ( )
91- {
92- throw new NotSupportedException ( ) ;
93- }
60+ public void ClearReplyTo ( ) => throw new NotSupportedException ( ) ;
9461
95- public void ClearTimestamp ( )
96- {
97- throw new NotSupportedException ( ) ;
98- }
62+ public void ClearTimestamp ( ) => throw new NotSupportedException ( ) ;
9963
100- public void ClearType ( )
101- {
102- throw new NotSupportedException ( ) ;
103- }
64+ public void ClearType ( ) => throw new NotSupportedException ( ) ;
10465
105- public void ClearUserId ( )
106- {
107- throw new NotSupportedException ( ) ;
108- }
66+ public void ClearUserId ( ) => throw new NotSupportedException ( ) ;
10967
110- public bool IsAppIdPresent ( ) => AppId != null ;
68+ public bool IsAppIdPresent ( ) => throw new NotSupportedException ( ) ;
11169
112- public bool IsClusterIdPresent ( )
113- {
114- throw new NotSupportedException ( ) ;
115- }
70+ public bool IsClusterIdPresent ( ) => throw new NotSupportedException ( ) ;
11671
117- public bool IsContentEncodingPresent ( ) => ContentEncoding != null ;
72+ public bool IsContentEncodingPresent ( ) => throw new NotSupportedException ( ) ;
11873
11974 public bool IsContentTypePresent ( ) => ContentType != null ;
12075
12176 public bool IsCorrelationIdPresent ( ) => ! string . IsNullOrEmpty ( CorrelationId ) ;
12277
12378 public bool IsDeliveryModePresent ( ) => DeliveryMode != 0 ;
12479
125- public bool IsExpirationPresent ( ) => Expiration != null ;
80+ public bool IsExpirationPresent ( ) => throw new NotSupportedException ( ) ;
12681
127- public bool IsHeadersPresent ( )
128- {
129- throw new NotSupportedException ( ) ;
130- }
82+ public bool IsHeadersPresent ( ) => throw new NotSupportedException ( ) ;
13183
13284 public bool IsMessageIdPresent ( ) => ! string . IsNullOrEmpty ( MessageId ) ;
13385
134- public bool IsPriorityPresent ( )
135- {
136- throw new NotSupportedException ( ) ;
137- }
86+ public bool IsPriorityPresent ( ) => throw new NotSupportedException ( ) ;
13887
13988 public bool IsReplyToPresent ( ) => ! string . IsNullOrEmpty ( ReplyTo ) ;
14089
141- public bool IsTimestampPresent ( )
142- {
143- throw new NotSupportedException ( ) ;
144- }
90+ public bool IsTimestampPresent ( ) => throw new NotSupportedException ( ) ;
14591
14692 public bool IsTypePresent ( ) => ! string . IsNullOrEmpty ( Type ) ;
14793
148- public bool IsUserIdPresent ( ) => UserId != null ;
94+ public bool IsUserIdPresent ( ) => throw new NotSupportedException ( ) ;
14995 }
15096
15197 MessageConverter converter = new MessageConverter ( MessageConverter . DefaultMessageIdStrategy ) ;
@@ -388,13 +334,12 @@ public void TestCanHandleTablesListHeader()
388334 }
389335
390336 [ Test ]
391- public void Should_handle_basic_properties ( )
337+ public void Should_handle_content_type ( )
392338 {
393339 var basicProperties = new TestingBasicProperties
394340 {
395341 MessageId = "Blah" ,
396- ContentType = "content_type" ,
397- ContentEncoding = "content_encoding"
342+ ContentType = "content_type"
398343 } ;
399344
400345 var message = new BasicDeliverEventArgs ( default , default , default , default , default , basicProperties , default ) ;
@@ -407,7 +352,6 @@ public void Should_handle_basic_properties()
407352 Assert . That ( messageId , Is . Not . Null ) ;
408353 Assert . That ( headers , Is . Not . Null ) ;
409354 Assert . That ( headers [ NServiceBus . Headers . ContentType ] , Is . EqualTo ( basicProperties . ContentType ) ) ;
410- Assert . That ( headers [ PropertiesToHeaderMapping . ContentEncoding ] , Is . EqualTo ( basicProperties . ContentEncoding ) ) ;
411355 } ) ;
412356 }
413357 }
0 commit comments