1- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
22using System . Linq ;
33using System . Text . Json ;
44using AwesomeAssertions ;
55using Soenneker . Gen . EnumValues . Tests . Enums ;
6- using Xunit ;
76
87namespace Soenneker . Gen . EnumValues . Tests ;
98
109public sealed class ColorCodeReferenceTests
1110{
12- [ Fact ]
11+ [ Test ]
1312 public void ReferenceEquals_should_work_for_same_static_instance ( )
1413 {
1514 var blue = ColorCode . Blue ;
@@ -19,7 +18,7 @@ public void ReferenceEquals_should_work_for_same_static_instance()
1918 result . Should ( ) . BeTrue ( ) ;
2019 }
2120
22- [ Fact ]
21+ [ Test ]
2322 public void ReferenceEquals_should_work_for_two_variables_pointing_to_same_instance ( )
2423 {
2524 var blue1 = ColorCode . Blue ;
@@ -30,7 +29,7 @@ public void ReferenceEquals_should_work_for_two_variables_pointing_to_same_insta
3029 result . Should ( ) . BeTrue ( ) ;
3130 }
3231
33- [ Fact ]
32+ [ Test ]
3433 public void ReferenceEquals_should_be_false_for_different_static_instances ( )
3534 {
3635 var blue = ColorCode . Blue ;
@@ -41,7 +40,7 @@ public void ReferenceEquals_should_be_false_for_different_static_instances()
4140 result . Should ( ) . BeFalse ( ) ;
4241 }
4342
44- [ Fact ]
43+ [ Test ]
4544 public void ReferenceEquals_should_be_true_when_pulled_from_collection ( )
4645 {
4746 var list = new List < ColorCode > { ColorCode . Blue } ;
@@ -53,7 +52,7 @@ public void ReferenceEquals_should_be_true_when_pulled_from_collection()
5352 result . Should ( ) . BeTrue ( ) ;
5453 }
5554
56- [ Fact ]
55+ [ Test ]
5756 public void ReferenceEquals_should_be_true_when_returned_from_method_without_rehydration ( )
5857 {
5958 ColorCode blue = GetBlue ( ) ;
@@ -63,7 +62,7 @@ public void ReferenceEquals_should_be_true_when_returned_from_method_without_reh
6362 result . Should ( ) . BeTrue ( ) ;
6463 }
6564
66- [ Fact ]
65+ [ Test ]
6766 public void Equals_and_ReferenceEquals_should_both_be_true_for_same_static_instance ( )
6867 {
6968 var blue1 = ColorCode . Blue ;
@@ -73,7 +72,7 @@ public void Equals_and_ReferenceEquals_should_both_be_true_for_same_static_insta
7372 ReferenceEquals ( blue1 , blue2 ) . Should ( ) . BeTrue ( ) ;
7473 }
7574
76- [ Fact ]
75+ [ Test ]
7776 public void Null_reference_comparisons_should_behave_correctly ( )
7877 {
7978 ColorCode ? left = null ;
@@ -84,7 +83,7 @@ public void Null_reference_comparisons_should_behave_correctly()
8483 ReferenceEquals ( ColorCode . Blue , right ) . Should ( ) . BeFalse ( ) ;
8584 }
8685
87- [ Fact ]
86+ [ Test ]
8887 public void ReferenceEquals_should_be_true_after_casting_to_object ( )
8988 {
9089 object blue = ColorCode . Blue ;
@@ -94,7 +93,7 @@ public void ReferenceEquals_should_be_true_after_casting_to_object()
9493 result . Should ( ) . BeTrue ( ) ;
9594 }
9695
97- [ Fact ]
96+ [ Test ]
9897 public void Dictionary_lookup_should_return_same_reference_instance ( )
9998 {
10099 var dict = new Dictionary < string , ColorCode >
@@ -107,7 +106,7 @@ public void Dictionary_lookup_should_return_same_reference_instance()
107106 ReferenceEquals ( value , ColorCode . Blue ) . Should ( ) . BeTrue ( ) ;
108107 }
109108
110- [ Fact ]
109+ [ Test ]
111110 public void Linq_First_should_return_same_reference_instance ( )
112111 {
113112 var values = new [ ] { ColorCode . Red , ColorCode . Blue } ;
@@ -117,7 +116,7 @@ public void Linq_First_should_return_same_reference_instance()
117116 ReferenceEquals ( result , ColorCode . Blue ) . Should ( ) . BeTrue ( ) ;
118117 }
119118
120- [ Fact ]
119+ [ Test ]
121120 public void JsonSerializer_deserialize_should_not_preserve_reference_by_default_for_normal_reference_types ( )
122121 {
123122 var json = JsonSerializer . Serialize ( ColorCode . Blue ) ;
@@ -128,7 +127,7 @@ public void JsonSerializer_deserialize_should_not_preserve_reference_by_default_
128127 ReferenceEquals ( deserialized , ColorCode . Blue ) . Should ( ) . BeTrue ( ) ;
129128 }
130129
131- [ Fact ]
130+ [ Test ]
132131 public void JsonSerializer_should_preserve_reference_only_if_custom_converter_rehydrates_static_instance ( )
133132 {
134133 var json = JsonSerializer . Serialize ( ColorCode . Blue ) ;
@@ -138,7 +137,7 @@ public void JsonSerializer_should_preserve_reference_only_if_custom_converter_re
138137 ReferenceEquals ( deserialized , ColorCode . Blue ) . Should ( ) . BeTrue ( ) ;
139138 }
140139
141- [ Fact ]
140+ [ Test ]
142141 public void FromName_should_match_reference ( )
143142 {
144143 var original = ColorCode . Blue ;
0 commit comments