@@ -18,7 +18,7 @@ public AbbreviatedUnitsConverterTests() : base(new AbbreviatedUnitsConverter())
1818 public void DoubleQuantity_SerializedWithDoubleValueAndAbbreviatedUnit ( )
1919 {
2020 var quantity = new Mass ( 1.20 , MassUnit . Milligram ) ;
21- var expectedJson = "{ \ " Value\ " :1.2,\ " Unit\" : \ " mg\" , \ " Type\" : \ " Mass\" } " ;
21+ var expectedJson = """{ "Value":1.2,"Unit": "mg", "Type": "Mass"}"" " ;
2222
2323 var json = SerializeObject ( quantity ) ;
2424
@@ -40,7 +40,7 @@ public void DecimalQuantity_SerializedWithDecimalValueAndAbbreviatedUnit()
4040 public void InterfaceObject_IncludesTypeInformation ( )
4141 {
4242 var testObject = new TestInterfaceObject { Quantity = new Information ( 1.20m , InformationUnit . Exabyte ) } ;
43- var expectedJson = "{ \ " Quantity\ " :{\ " Value\ " :1.20, \ " Unit\" : \ " EB\" , \ " Type\" : \ " Information\ " }}" ;
43+ var expectedJson = """{ "Quantity":{"Value":1.2, "Unit": "EB", "Type": "Information"}}"" " ;
4444
4545 var json = SerializeObject ( testObject ) ;
4646
@@ -52,7 +52,7 @@ public void InterfaceObject_SerializesWithoutKnownTypeInformation()
5252 {
5353 var testObject = new TestInterfaceObject { Quantity = new Volume ( 1.2 , VolumeUnit . Microliter ) } ;
5454
55- var expectedJson = "{ \ " Quantity\ " :{\ " Value\ " :1.2,\ " Unit\" : \ " µl\" , \ " Type\" : \ " Volume\ " }}" ;
55+ var expectedJson = """{ "Quantity":{"Value":1.2,"Unit": "µl", "Type": "Volume"}}"" " ;
5656
5757 var json = SerializeObject ( testObject ) ;
5858
@@ -66,7 +66,7 @@ public void InterfaceObject_SerializesWithoutKnownTypeInformation()
6666 [ Fact ]
6767 public void DoubleIQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit ( )
6868 {
69- var json = "{ \ " Value\ " :1.2,\ " Unit\" : \ " mg\" , \ " Type\" : \ " Mass\" } " ;
69+ var json = """{ "Value":1.2,"Unit": "mg", "Type": "Mass"}"" " ;
7070
7171 var quantity = DeserializeObject < IQuantity > ( json ) ;
7272
@@ -77,7 +77,7 @@ public void DoubleIQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit()
7777 [ Fact ]
7878 public void DoubleQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit ( )
7979 {
80- var json = "{ \ " Value\ " :1.2,\ " Unit\" : \ " mg\" } " ;
80+ var json = """{ "Value":1.2,"Unit": "mg"}"" " ;
8181
8282 var quantity = DeserializeObject < Mass > ( json ) ;
8383
@@ -88,7 +88,7 @@ public void DoubleQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit()
8888 [ Fact ]
8989 public void DoubleIQuantity_DeserializedFromDoubleValueAndNonAmbiguousAbbreviatedUnit_WithoutQuantityType ( )
9090 {
91- var json = "{ \ " Value\ " :1.2,\ " Unit\" : \ " em\" } " ;
91+ var json = """{ "Value":1.2,"Unit": "em"}"" " ;
9292
9393 var quantity = DeserializeObject < Mass > ( json ) ;
9494
@@ -99,15 +99,15 @@ public void DoubleIQuantity_DeserializedFromDoubleValueAndNonAmbiguousAbbreviate
9999 [ Fact ]
100100 public void ThrowsAmbiguousUnitParseException_WhenDeserializingAmbiguousAbbreviation_WithoutQuantityType ( )
101101 {
102- var json = "{ \ " Value\ " :1.2,\ " Unit\" : \ " mg\" } " ;
102+ var json = """{ "Value":1.2,"Unit": "mg"}"" " ;
103103
104104 Assert . Throws < AmbiguousUnitParseException > ( ( ) => DeserializeObject < IQuantity > ( json ) ) ;
105105 }
106106
107107 [ Fact ]
108108 public void DoubleIQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit_CaseInsensitive ( )
109109 {
110- var json = "{ \ " value\ " :1.2,\ " unit\" : \ " Mg\" , \ " type\" : \ " mass\" } " ;
110+ var json = """{ "value":1.2,"unit": "Mg", "type": "mass"}"" " ;
111111
112112 var quantity = DeserializeObject < IQuantity > ( json ) ;
113113
@@ -118,7 +118,7 @@ public void DoubleIQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit_CaseIn
118118 [ Fact ]
119119 public void DoubleIQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit_CaseSensitiveUnits ( )
120120 {
121- var json = "{ \ " value\ " :1.2,\ " unit\" : \ " Mbar\" , \ " type\" : \ " pressure\" } " ;
121+ var json = """{ "value":1.2,"unit": "Mbar", "type": "pressure"}"" " ;
122122
123123 var megabar = DeserializeObject < IQuantity > ( json ) ;
124124 var millibar = DeserializeObject < IQuantity > ( json . ToLower ( ) ) ;
@@ -132,23 +132,23 @@ public void DoubleIQuantity_DeserializedFromDoubleValueAndAbbreviatedUnit_CaseSe
132132 [ Fact ]
133133 public void UnitsNetExceptionThrown_WhenDeserializing_FromUnknownQuantityType ( )
134134 {
135- var json = "{ \ " Value\ " :1.2,\ " Unit\" : \ " mg\" , \ " Type\" : \ " invalid\" } " ;
135+ var json = """{ "Value":1.2,"Unit": "mg", "Type": "invalid"}"" " ;
136136
137137 Assert . Throws < UnitsNetException > ( ( ) => DeserializeObject < Mass > ( json ) ) ;
138138 }
139139
140140 [ Fact ]
141141 public void UnitsNotFoundExceptionThrown_WhenDeserializing_FromUnknownUnit ( )
142142 {
143- var json = "{ \ " Value\ " :1.2,\ " Unit\" : \ " invalid\" , \ " Type\" : \ " Mass\" } " ;
143+ var json = """{ "Value":1.2,"Unit": "invalid", "Type": "Mass"}"" " ;
144144
145145 Assert . Throws < UnitNotFoundException > ( ( ) => DeserializeObject < Mass > ( json ) ) ;
146146 }
147147
148148 [ Fact ]
149149 public void DoubleIQuantity_DeserializedFromQuotedDoubleValueAndAbbreviatedUnit ( )
150150 {
151- var json = "{ \ " Value\" : \ " 1.2\" , \ " Unit\" : \ " mg\" , \ " Type\" : \ " Mass\" } " ;
151+ var json = """{ "Value": "1.2", "Unit": "mg", "Type": "Mass"}"" " ;
152152
153153 var quantity = DeserializeObject < IQuantity > ( json ) ;
154154
@@ -159,7 +159,7 @@ public void DoubleIQuantity_DeserializedFromQuotedDoubleValueAndAbbreviatedUnit(
159159 [ Fact ]
160160 public void DoubleQuantity_DeserializedFromQuotedDoubleValueAndAbbreviatedUnit ( )
161161 {
162- var json = "{ \ " Value\" : \ " 1.2\" , \ " Unit\" : \ " mg\" } " ;
162+ var json = """{ "Value": "1.2", "Unit": "mg"}"" " ;
163163
164164 var quantity = DeserializeObject < Mass > ( json ) ;
165165
@@ -170,7 +170,7 @@ public void DoubleQuantity_DeserializedFromQuotedDoubleValueAndAbbreviatedUnit()
170170 [ Fact ]
171171 public void DoubleZeroIQuantity_DeserializedFromAbbreviatedUnitAndNoValue ( )
172172 {
173- var json = "{ \ " Unit\" : \ " mg\" , \ " Type\" : \ " Mass\" } " ;
173+ var json = """{ "Unit": "mg", "Type": "Mass"}"" " ;
174174
175175 var quantity = DeserializeObject < IQuantity > ( json ) ;
176176
@@ -181,7 +181,7 @@ public void DoubleZeroIQuantity_DeserializedFromAbbreviatedUnitAndNoValue()
181181 [ Fact ]
182182 public void DoubleZeroQuantity_DeserializedFromAbbreviatedUnitAndNoValue ( )
183183 {
184- var json = "{ \ " Unit\" : \ " mg\" } " ;
184+ var json = """{ "Unit": "mg"}"" " ;
185185
186186 var quantity = DeserializeObject < Mass > ( json ) ;
187187
@@ -192,7 +192,7 @@ public void DoubleZeroQuantity_DeserializedFromAbbreviatedUnitAndNoValue()
192192 [ Fact ]
193193 public void DoubleBaseUnitQuantity_DeserializedFromValueAndNoUnit ( )
194194 {
195- var json = "{ \ " Value\ " :1.2,\ " Type\" : \ " Mass\" } " ;
195+ var json = """{ "Value":1.2,"Type": "Mass"}"" " ;
196196
197197 var quantity = DeserializeObject < IQuantity > ( json ) ;
198198
@@ -203,7 +203,7 @@ public void DoubleBaseUnitQuantity_DeserializedFromValueAndNoUnit()
203203 [ Fact ]
204204 public void DoubleBaseUnitIQuantity_DeserializedFromValueAndNoUnit ( )
205205 {
206- var json = "{ \ " Value\ " :1.2}" ;
206+ var json = """{ "Value":1.2}"" " ;
207207
208208 var quantity = DeserializeObject < Mass > ( json ) ;
209209
@@ -214,7 +214,7 @@ public void DoubleBaseUnitIQuantity_DeserializedFromValueAndNoUnit()
214214 [ Fact ]
215215 public void DoubleZeroBaseIQuantity_DeserializedFromQuantityTypeOnly ( )
216216 {
217- var json = "{ \ " Type\" : \ " Mass\" } " ;
217+ var json = """{ "Type": "Mass"}"" " ;
218218
219219 var quantity = DeserializeObject < IQuantity > ( json ) ;
220220
@@ -284,7 +284,7 @@ public void DecimalQuantity_DeserializedFromQuotedDecimalValueAndAbbreviatedUnit
284284 [ Fact ]
285285 public void DecimalZeroIQuantity_DeserializedFromAbbreviatedUnitAndNoValue ( )
286286 {
287- var json = "{ \ " Unit\" : \ " EB\" , \ " Type\" : \ " Information\" } " ;
287+ var json = """{ "Unit": "EB", "Type": "Information"}"" " ;
288288
289289 var quantity = ( Information ) DeserializeObject < IQuantity > ( json ) ;
290290
@@ -295,7 +295,7 @@ public void DecimalZeroIQuantity_DeserializedFromAbbreviatedUnitAndNoValue()
295295 [ Fact ]
296296 public void DecimalZeroQuantity_DeserializedFromAbbreviatedUnitAndNoValue ( )
297297 {
298- var json = "{ \ " Unit\" : \ " EB\" } " ;
298+ var json = """{ "Unit": "EB"}"" " ;
299299
300300 var quantity = DeserializeObject < Information > ( json ) ;
301301
@@ -330,7 +330,7 @@ public void DecimalBaseUnitQuantity_DeserializedFromDecimalValueAndNoUnit()
330330 [ Fact ]
331331 public void DecimalZeroBaseIQuantity_DeserializedFromQuantityTypeOnly ( )
332332 {
333- var json = "{ \ " Type\" : \ " Information\" } " ;
333+ var json = """{ "Type": "Information"}"" " ;
334334
335335 var quantity = ( Information ) DeserializeObject < IQuantity > ( json ) ;
336336
0 commit comments