6
6
using FluentNHibernate . MappingModel . Collections ;
7
7
using FluentNHibernate . Specs . Automapping . Fixtures ;
8
8
using Machine . Specifications ;
9
- using FluentAssertions ;
10
9
11
10
namespace FluentNHibernate . Specs . Automapping ;
12
11
@@ -16,7 +15,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_strings : Auto
16
15
maps_property = step . ShouldMap ( FakeMembers . IListOfStrings ) ;
17
16
18
17
It should_accept_the_property = ( ) =>
19
- maps_property . Should ( ) . BeTrue ( ) ;
18
+ maps_property . ShouldBeTrue ( ) ;
20
19
21
20
static bool maps_property ;
22
21
}
@@ -27,7 +26,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_ints : AutoMap
27
26
maps_property = step . ShouldMap ( FakeMembers . IListOfInts ) ;
28
27
29
28
It should_accept_the_property = ( ) =>
30
- maps_property . Should ( ) . BeTrue ( ) ;
29
+ maps_property . ShouldBeTrue ( ) ;
31
30
32
31
static bool maps_property ;
33
32
}
@@ -38,7 +37,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_doubles : Auto
38
37
maps_property = step . ShouldMap ( FakeMembers . IListOfDoubles ) ;
39
38
40
39
It should_accept_the_property = ( ) =>
41
- maps_property . Should ( ) . BeTrue ( ) ;
40
+ maps_property . ShouldBeTrue ( ) ;
42
41
43
42
static bool maps_property ;
44
43
}
@@ -49,7 +48,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_shorts : AutoM
49
48
maps_property = step . ShouldMap ( FakeMembers . IListOfShorts ) ;
50
49
51
50
It should_accept_the_property = ( ) =>
52
- maps_property . Should ( ) . BeTrue ( ) ;
51
+ maps_property . ShouldBeTrue ( ) ;
53
52
54
53
static bool maps_property ;
55
54
}
@@ -60,7 +59,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_longs : AutoMa
60
59
maps_property = step . ShouldMap ( FakeMembers . IListOfLongs ) ;
61
60
62
61
It should_accept_the_property = ( ) =>
63
- maps_property . Should ( ) . BeTrue ( ) ;
62
+ maps_property . ShouldBeTrue ( ) ;
64
63
65
64
static bool maps_property ;
66
65
}
@@ -71,7 +70,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_floats : AutoM
71
70
maps_property = step . ShouldMap ( FakeMembers . IListOfFloats ) ;
72
71
73
72
It should_accept_the_property = ( ) =>
74
- maps_property . Should ( ) . BeTrue ( ) ;
73
+ maps_property . ShouldBeTrue ( ) ;
75
74
76
75
static bool maps_property ;
77
76
}
@@ -82,7 +81,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_bools : AutoMa
82
81
maps_property = step . ShouldMap ( FakeMembers . IListOfBools ) ;
83
82
84
83
It should_accept_the_property = ( ) =>
85
- maps_property . Should ( ) . BeTrue ( ) ;
84
+ maps_property . ShouldBeTrue ( ) ;
86
85
87
86
static bool maps_property ;
88
87
}
@@ -93,7 +92,7 @@ public class when_the_automapper_is_asked_if_it_can_map_a_list_of_DateTimes : Au
93
92
maps_property = step . ShouldMap ( FakeMembers . IListOfDateTimes ) ;
94
93
95
94
It should_accept_the_property = ( ) =>
96
- maps_property . Should ( ) . BeTrue ( ) ;
95
+ maps_property . ShouldBeTrue ( ) ;
97
96
98
97
static bool maps_property ;
99
98
}
@@ -107,7 +106,7 @@ public class when_the_automapper_is_told_to_map_a_list_of_simple_types_with_a_cu
107
106
step . Map ( container , FakeMembers . IListOfStrings ) ;
108
107
109
108
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" ) ;
111
110
}
112
111
113
112
public 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
116
115
step . Map ( container , FakeMembers . IListOfStrings ) ;
117
116
118
117
It should_create_a_collection = ( ) =>
119
- container . Collections . Count ( ) . Should ( ) . Be ( 1 ) ;
118
+ container . Collections . Count ( ) . ShouldEqual ( 1 ) ;
120
119
121
120
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 ) ;
123
122
124
123
It should_create_an_element_for_the_collection = ( ) =>
125
- container . Collections . Single ( ) . Element . Should ( ) . NotBeNull ( ) ;
124
+ container . Collections . Single ( ) . Element . ShouldNotBeNull ( ) ;
126
125
127
126
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" ) ;
129
128
130
129
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 ) ) ) ;
132
131
133
132
It should_create_a_key = ( ) =>
134
- container . Collections . Single ( ) . Key . Should ( ) . NotBeNull ( ) ;
133
+ container . Collections . Single ( ) . Key . ShouldNotBeNull ( ) ;
135
134
136
135
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 ) ;
138
137
139
138
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" ) ;
141
140
142
141
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 ) ;
144
143
145
144
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 ) ;
147
146
148
147
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 ) ;
150
149
151
150
It should_not_create_a_relationship_for_the_collection = ( ) =>
152
- container . Collections . Single ( ) . Relationship . Should ( ) . BeNull ( ) ;
151
+ container . Collections . Single ( ) . Relationship . ShouldBeNull ( ) ;
153
152
154
153
It should_not_create_a_component_for_the_collection = ( ) =>
155
- container . Collections . Single ( ) . CompositeElement . Should ( ) . BeNull ( ) ;
154
+ container . Collections . Single ( ) . CompositeElement . ShouldBeNull ( ) ;
156
155
}
157
156
158
157
public abstract class AutoMapOneToManySpec
0 commit comments