@@ -133,8 +133,7 @@ public void SerializerIntegrationTest()
133133 //ModelConverter mc = new ModelConverter();
134134 //ContractResolver.PluralizationService = new PluralizationService();
135135
136- JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( ) ;
137- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
136+ JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( new JSONAPI . Core . PluralizationService ( ) ) ;
138137 MemoryStream stream = new MemoryStream ( ) ;
139138
140139 // Act
@@ -158,8 +157,7 @@ public void SerializeArrayIntegrationTest()
158157 //ModelConverter mc = new ModelConverter();
159158 //ContractResolver.PluralizationService = new PluralizationService();
160159
161- JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( ) ;
162- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
160+ JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( new JSONAPI . Core . PluralizationService ( ) ) ;
163161 MemoryStream stream = new MemoryStream ( ) ;
164162
165163 // Act
@@ -180,7 +178,6 @@ public void Should_serialize_error()
180178 {
181179 // Arrange
182180 var formatter = new JSONAPI . Json . JsonApiFormatter ( new MockErrorSerializer ( ) ) ;
183- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
184181 var stream = new MemoryStream ( ) ;
185182
186183 // Act
@@ -199,8 +196,7 @@ public void Should_serialize_error()
199196 public void SerializeErrorIntegrationTest ( )
200197 {
201198 // Arrange
202- JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( ) ;
203- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
199+ JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( new JSONAPI . Core . PluralizationService ( ) ) ;
204200 MemoryStream stream = new MemoryStream ( ) ;
205201
206202 // Act
@@ -224,8 +220,7 @@ public void SerializeErrorIntegrationTest()
224220 public void DeserializeCollectionIntegrationTest ( )
225221 {
226222 // Arrange
227- JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( ) ;
228- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
223+ JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( new JSONAPI . Core . PluralizationService ( ) ) ;
229224 MemoryStream stream = new MemoryStream ( ) ;
230225
231226 formatter . WriteToStreamAsync ( typeof ( Post ) , new List < Post > { p , p2 } , stream , ( System . Net . Http . HttpContent ) null , ( System . Net . TransportContext ) null ) ;
@@ -246,8 +241,7 @@ public void DeserializeCollectionIntegrationTest()
246241 [ TestMethod ( ) , Timeout ( 1000 ) ]
247242 public void DeserializeExtraPropertyTest ( )
248243 {
249- JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( ) ;
250- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
244+ JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( new JSONAPI . Core . PluralizationService ( ) ) ;
251245 MemoryStream stream = new MemoryStream ( ) ;
252246
253247 stream = new MemoryStream ( System . Text . Encoding . ASCII . GetBytes ( @"{""authors"":{""id"":13,""name"":""Jason Hater"",""bogus"":""PANIC!"",""links"":{""posts"":[]}}}" ) ) ;
@@ -264,8 +258,7 @@ public void DeserializeExtraPropertyTest()
264258 [ TestMethod ( ) , Timeout ( 1000 ) ]
265259 public void DeserializeExtraRelationshipTest ( )
266260 {
267- JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( ) ;
268- formatter . PluralizationService = new JSONAPI . Core . PluralizationService ( ) ;
261+ JsonApiFormatter formatter = new JSONAPI . Json . JsonApiFormatter ( new JSONAPI . Core . PluralizationService ( ) ) ;
269262 MemoryStream stream = new MemoryStream ( ) ;
270263
271264 stream = new MemoryStream ( System . Text . Encoding . ASCII . GetBytes ( @"{""authors"":{""id"":13,""name"":""Jason Hater"",""links"":{""posts"":[],""bogus"":[""PANIC!""]}}}" ) ) ;
0 commit comments