66using FluentNHibernate . MappingModel . Collections ;
77using FluentNHibernate . Specs . Automapping . Fixtures ;
88using Machine . Specifications ;
9- using FluentAssertions ;
109
1110namespace FluentNHibernate . Specs . Automapping ;
1211
@@ -16,7 +15,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_strings : Auto
1615 maps_property = step . ShouldMap ( FakeMembers . IListOfStrings ) ;
1716
1817 It should_accept_the_property = ( ) =>
19- maps_property . Should ( ) . BeTrue ( ) ;
18+ maps_property . ShouldBeTrue ( ) ;
2019
2120 static bool maps_property ;
2221}
@@ -27,7 +26,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_ints : AutoMap
2726 maps_property = step . ShouldMap ( FakeMembers . IListOfInts ) ;
2827
2928 It should_accept_the_property = ( ) =>
30- maps_property . Should ( ) . BeTrue ( ) ;
29+ maps_property . ShouldBeTrue ( ) ;
3130
3231 static bool maps_property ;
3332}
@@ -38,7 +37,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_doubles : Auto
3837 maps_property = step . ShouldMap ( FakeMembers . IListOfDoubles ) ;
3938
4039 It should_accept_the_property = ( ) =>
41- maps_property . Should ( ) . BeTrue ( ) ;
40+ maps_property . ShouldBeTrue ( ) ;
4241
4342 static bool maps_property ;
4443}
@@ -49,7 +48,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_shorts : AutoM
4948 maps_property = step . ShouldMap ( FakeMembers . IListOfShorts ) ;
5049
5150 It should_accept_the_property = ( ) =>
52- maps_property . Should ( ) . BeTrue ( ) ;
51+ maps_property . ShouldBeTrue ( ) ;
5352
5453 static bool maps_property ;
5554}
@@ -60,7 +59,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_longs : AutoMa
6059 maps_property = step . ShouldMap ( FakeMembers . IListOfLongs ) ;
6160
6261 It should_accept_the_property = ( ) =>
63- maps_property . Should ( ) . BeTrue ( ) ;
62+ maps_property . ShouldBeTrue ( ) ;
6463
6564 static bool maps_property ;
6665}
@@ -71,7 +70,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_floats : AutoM
7170 maps_property = step . ShouldMap ( FakeMembers . IListOfFloats ) ;
7271
7372 It should_accept_the_property = ( ) =>
74- maps_property . Should ( ) . BeTrue ( ) ;
73+ maps_property . ShouldBeTrue ( ) ;
7574
7675 static bool maps_property ;
7776}
@@ -82,7 +81,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_bools : AutoMa
8281 maps_property = step . ShouldMap ( FakeMembers . IListOfBools ) ;
8382
8483 It should_accept_the_property = ( ) =>
85- maps_property . Should ( ) . BeTrue ( ) ;
84+ maps_property . ShouldBeTrue ( ) ;
8685
8786 static bool maps_property ;
8887}
@@ -93,7 +92,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_DateTimes : Au
9392 maps_property = step . ShouldMap ( FakeMembers . IListOfDateTimes ) ;
9493
9594 It should_accept_the_property = ( ) =>
96- maps_property . Should ( ) . BeTrue ( ) ;
95+ maps_property . ShouldBeTrue ( ) ;
9796
9897 static bool maps_property ;
9998}
@@ -107,7 +106,7 @@ public class when_the_automapper_is_told_to_map_a_list_of_simple_types_with_a_cu
107106 step . Map ( container , FakeMembers . IListOfStrings ) ;
108107
109108 It should_create_use_the_element_column_name_defined_in_the_expressions = ( ) =>
110- container . Collections . Single ( ) . Element . Columns . Single ( ) . Name . Should ( ) . Be ( "custom_column" ) ;
109+ container . Collections . Single ( ) . Element . Columns . Single ( ) . Name . ShouldEqual ( "custom_column" ) ;
111110}
112111
113112public class when_the_automapper_is_told_to_map_a_list_of_simple_types : AutoMapOneToManySpec
@@ -116,43 +115,43 @@ public class when_the_automapper_is_told_to_map_a_list_of_simple_types : AutoMap
116115 step . Map ( container , FakeMembers . IListOfStrings ) ;
117116
118117 It should_create_a_collection = ( ) =>
119- container . Collections . Count ( ) . Should ( ) . Be ( 1 ) ;
118+ container . Collections . Count ( ) . ShouldEqual ( 1 ) ;
120119
121120 It should_create_a_collection_that_s_a_bag = ( ) =>
122- container . Collections . Single ( ) . Collection . Should ( ) . Be ( Collection . Bag ) ;
121+ container . Collections . Single ( ) . Collection . ShouldEqual ( Collection . Bag ) ;
123122
124123 It should_create_an_element_for_the_collection = ( ) =>
125- container . Collections . Single ( ) . Element . Should ( ) . NotBeNull ( ) ;
124+ container . Collections . Single ( ) . Element . ShouldNotBeNull ( ) ;
126125
127126 It should_use_the_default_element_column = ( ) =>
128- container . Collections . Single ( ) . Element . Columns . Single ( ) . Name . Should ( ) . Be ( "Value" ) ;
127+ container . Collections . Single ( ) . Element . Columns . Single ( ) . Name . ShouldEqual ( "Value" ) ;
129128
130129 It should_set_the_element_type_to_the_first_generic_argument_of_the_collection_type = ( ) =>
131- container . Collections . Single ( ) . Element . Type . Should ( ) . Be ( new TypeReference ( typeof ( string ) ) ) ;
130+ container . Collections . Single ( ) . Element . Type . ShouldEqual ( new TypeReference ( typeof ( string ) ) ) ;
132131
133132 It should_create_a_key = ( ) =>
134- container . Collections . Single ( ) . Key . Should ( ) . NotBeNull ( ) ;
133+ container . Collections . Single ( ) . Key . ShouldNotBeNull ( ) ;
135134
136135 It should_set_the_key_s_containing_entity_to_the_type_owning_the_property = ( ) =>
137- container . Collections . Single ( ) . Key . ContainingEntityType . Should ( ) . Be ( FakeMembers . Type ) ;
136+ container . Collections . Single ( ) . Key . ContainingEntityType . ShouldEqual ( FakeMembers . Type ) ;
138137
139138 It should_create_a_column_for_the_key_with_the_default_id_naming = ( ) =>
140- container . Collections . Single ( ) . Key . Columns . Single ( ) . Name . Should ( ) . Be ( "Target_id" ) ;
139+ container . Collections . Single ( ) . Key . Columns . Single ( ) . Name . ShouldEqual ( "Target_id" ) ;
141140
142141 It should_set_the_collection_s_containing_entity_type_to_the_type_owning_the_property = ( ) =>
143- container . Collections . Single ( ) . ContainingEntityType . Should ( ) . Be ( FakeMembers . Type ) ;
142+ container . Collections . Single ( ) . ContainingEntityType . ShouldEqual ( FakeMembers . Type ) ;
144143
145144 It should_set_the_collection_s_member_to_the_property = ( ) =>
146- container . Collections . Single ( ) . Member . Should ( ) . Be ( FakeMembers . IListOfStrings ) ;
145+ container . Collections . Single ( ) . Member . ShouldEqual ( FakeMembers . IListOfStrings ) ;
147146
148147 It should_set_the_collection_s_name_to_the_property_name = ( ) =>
149- container . Collections . Single ( ) . Name . Should ( ) . Be ( FakeMembers . IListOfStrings . Name ) ;
148+ container . Collections . Single ( ) . Name . ShouldEqual ( FakeMembers . IListOfStrings . Name ) ;
150149
151150 It should_not_create_a_relationship_for_the_collection = ( ) =>
152- container . Collections . Single ( ) . Relationship . Should ( ) . BeNull ( ) ;
151+ container . Collections . Single ( ) . Relationship . ShouldBeNull ( ) ;
153152
154153 It should_not_create_a_component_for_the_collection = ( ) =>
155- container . Collections . Single ( ) . CompositeElement . Should ( ) . BeNull ( ) ;
154+ container . Collections . Single ( ) . CompositeElement . ShouldBeNull ( ) ;
156155}
157156
158157public abstract class AutoMapOneToManySpec
0 commit comments