Skip to content

Commit fe4a5b9

Browse files
Chris Chilverspaulbatum
authored andcommitted
Fixed issue nhibernate#355 - Failing tests due to abstract classes
1 parent f021217 commit fe4a5b9

8 files changed

+53
-2
lines changed

src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@
321321
<Compile Include="FluentInterfaceTests\JoinedSubclassMutablePropertyModelGenerationTests.cs" />
322322
<Compile Include="FluentInterfaceTests\DiscriminatorMutablePropertyModelGenerationTests.cs" />
323323
<Compile Include="FluentInterfaceTests\ManyToManyMutablePropertyModelGenerationTests.cs" />
324-
<Compile Include="FluentInterfaceTests\ManyToManySubPartModelGenerationTests.cs" />
325324
<Compile Include="FluentInterfaceTests\ManyToOneMutablePropertyModelGenerationTests.cs" />
326325
<Compile Include="FluentInterfaceTests\ModelTester.cs" />
327326
<Compile Include="FluentInterfaceTests\OneToManyMutablePropertyModelGenerationTests.cs" />

src/FluentNHibernate.Testing/Specification.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace FluentNHibernate.Testing
1010
{
11-
[TestFixture]
1211
public class Specification
1312
{
1413
public Exception thrown_exception { get; private set; }

src/FluentNHibernate.Testing/Testing/PersistenceSpecificationExtensionsSpecs.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public override void establish_context()
4646
}
4747
}
4848

49+
[TestFixture]
4950
public class When_a_checked_property_is_added : With_persistence_specification<PropertyEntity>
5051
{
5152
public override void because()
@@ -72,6 +73,7 @@ public void should_set_the_custom_equality_comparer()
7273
}
7374
}
7475

76+
[TestFixture]
7577
public class When_a_checked_property_of_an_array_type_is_added : With_persistence_specification<ListEntity>
7678
{
7779
public override void because()
@@ -98,6 +100,7 @@ public void should_set_the_custom_equality_comparer()
98100
}
99101
}
100102

103+
[TestFixture]
101104
public class When_a_checked_property_with_a_custom_setter_is_added : With_persistence_specification<PropertyEntity>
102105
{
103106
protected Action<PropertyEntity, string> propertySetter;
@@ -132,6 +135,7 @@ public void should_set_the_custom_equality_comparer()
132135
}
133136
}
134137

138+
[TestFixture]
135139
public class When_the_value_setter_of_a_checked_property_is_invoked : When_a_checked_property_with_a_custom_setter_is_added
136140
{
137141
private PropertyEntity entity;
@@ -155,6 +159,7 @@ public void should_invoke_the_custom_setter()
155159
}
156160
}
157161

162+
[TestFixture]
158163
public class When_a_checked_reference_is_added : With_persistence_specification<ReferenceEntity>
159164
{
160165
public override void because()
@@ -181,6 +186,7 @@ public void should_set_the_custom_equality_comparer()
181186
}
182187
}
183188

189+
[TestFixture]
184190
public class When_a_checked_reference_with_a_custom_setter_is_added : With_persistence_specification<ReferenceEntity>
185191
{
186192
protected Action<ReferenceEntity, OtherEntity> propertySetter;
@@ -215,6 +221,7 @@ public void should_set_the_custom_equality_comparer()
215221
}
216222
}
217223

224+
[TestFixture]
218225
public class When_the_value_setter_of_a_checked_reference_is_invoked : When_a_checked_reference_with_a_custom_setter_is_added
219226
{
220227
private ReferenceEntity entity;
@@ -240,6 +247,7 @@ public void should_invoke_the_custom_setter()
240247
}
241248
}
242249

250+
[TestFixture]
243251
public class When_a_checked_list_is_added : With_persistence_specification<ReferenceEntity>
244252
{
245253
public override void because()
@@ -266,6 +274,7 @@ public void should_set_the_custom_equality_comparer()
266274
}
267275
}
268276

277+
[TestFixture]
269278
public class When_a_checked_enumerable_with_a_custom_item_setter_is_added : With_persistence_specification<ReferenceEntity>
270279
{
271280
protected Action<ReferenceEntity, OtherEntity> listSetter;
@@ -300,6 +309,7 @@ public void should_set_the_custom_equality_comparer()
300309
}
301310
}
302311

312+
[TestFixture]
303313
public class When_a_checked_list_with_a_custom_list_setter_is_added : With_persistence_specification<ReferenceEntity>
304314
{
305315
protected Action<ReferenceEntity, IEnumerable<OtherEntity>> listSetter;
@@ -334,6 +344,7 @@ public void should_set_the_custom_equality_comparer()
334344
}
335345
}
336346

347+
[TestFixture]
337348
public class When_the_list_setter_of_a_checked_list_is_invoked : When_a_checked_list_with_a_custom_list_setter_is_added
338349
{
339350
private ReferenceEntity entity;
@@ -359,6 +370,7 @@ public void should_invoke_the_custom_setter()
359370
}
360371
}
361372

373+
[TestFixture]
362374
public class When_a_checked_list_with_a_custom_list_item_setter_is_added : With_persistence_specification<ReferenceEntity>
363375
{
364376
protected Action<ReferenceEntity, OtherEntity> listItemSetter;
@@ -393,6 +405,7 @@ public void should_set_the_custom_equality_comparer()
393405
}
394406
}
395407

408+
[TestFixture]
396409
public class When_the_list_item_setter_of_a_checked_list_is_invoked : When_a_checked_list_with_a_custom_list_item_setter_is_added
397410
{
398411
private ReferenceEntity entity;
@@ -419,6 +432,7 @@ public void should_invoke_the_custom_setter_for_each_item()
419432
}
420433
}
421434

435+
[TestFixture]
422436
public class When_a_checked_component_list_is_added : With_persistence_specification<ReferenceEntity>
423437
{
424438
public override void because()
@@ -445,6 +459,7 @@ public void should_set_the_custom_equality_comparer()
445459
}
446460
}
447461

462+
[TestFixture]
448463
public class When_a_checked_component_list_with_a_custom_list_setter_is_added : With_persistence_specification<ReferenceEntity>
449464
{
450465
protected Action<ReferenceEntity, IEnumerable<OtherEntity>> listSetter;
@@ -479,6 +494,7 @@ public void should_set_the_custom_equality_comparer()
479494
}
480495
}
481496

497+
[TestFixture]
482498
public class When_the_list_setter_of_a_checked_component_list_is_invoked : When_a_checked_component_list_with_a_custom_list_setter_is_added
483499
{
484500
private ReferenceEntity entity;
@@ -504,6 +520,7 @@ public void should_invoke_the_custom_setter()
504520
}
505521
}
506522

523+
[TestFixture]
507524
public class When_a_checked_component_list_with_a_custom_list_item_setter_is_added : With_persistence_specification<ReferenceEntity>
508525
{
509526
protected Action<ReferenceEntity, OtherEntity> listItemSetter;
@@ -538,6 +555,7 @@ public void should_set_the_custom_equality_comparer()
538555
}
539556
}
540557

558+
[TestFixture]
541559
public class When_the_list_item_setter_of_a_checked_component_list_is_invoked : When_a_checked_component_list_with_a_custom_list_item_setter_is_added
542560
{
543561
private ReferenceEntity entity;

src/FluentNHibernate.Testing/Testing/SessionSourceConfigurationTester.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace FluentNHibernate.Testing.Testing
88
{
9+
[TestFixture]
910
public class when_building_a_session_source : with_fluent_configuration
1011
{
1112
private ISessionSource _sessionSource;
@@ -28,6 +29,7 @@ public void should_be_able_to_generate_the_schema()
2829
}
2930
}
3031

32+
[TestFixture]
3133
public class when_using_a_session_source_and_schema : with_fluent_configuration
3234
{
3335
private ISessionSource _sessionSource;

src/FluentNHibernate.Testing/Testing/Values/ListSpecs.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void should_succeed()
4646
}
4747
}
4848

49+
[TestFixture]
4950
public class When_a_list_property_with_a_public_setter_is_set : When_a_list_property_with_is_set_successfully
5051
{
5152
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -63,6 +64,7 @@ public override void should_set_the_list_items()
6364
}
6465
}
6566

67+
[TestFixture]
6668
public class When_a_list_property_with_a_private_setter_is_set : When_a_list_property_with_is_set_successfully
6769
{
6870
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -80,6 +82,7 @@ public override void should_set_the_list_items()
8082
}
8183
}
8284

85+
[TestFixture]
8386
public class When_a_list_property_is_set_with_a_custom_setter : When_a_list_property_with_is_set_successfully
8487
{
8588
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -110,6 +113,7 @@ public override void should_set_the_list_items()
110113
}
111114
}
112115

116+
[TestFixture]
113117
public class When_a_set_property_with_a_public_setter_is_set : When_a_list_property_with_is_set_successfully
114118
{
115119
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -127,6 +131,7 @@ public override void should_set_the_list_items()
127131
}
128132
}
129133

134+
[TestFixture]
130135
public class When_a_typed_set_property_with_a_public_setter_is_set : When_a_list_property_with_is_set_successfully
131136
{
132137
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -144,6 +149,7 @@ public override void should_set_the_list_items()
144149
}
145150
}
146151

152+
[TestFixture]
147153
public class When_a_collection_property_with_a_public_setter_is_set : When_a_list_property_with_is_set_successfully
148154
{
149155
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -164,6 +170,7 @@ public override void should_set_the_list_items()
164170
}
165171
}
166172

173+
[TestFixture]
167174
public class When_an_array_property_with_a_public_setter_is_set : When_a_list_property_with_is_set_successfully
168175
{
169176
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -181,6 +188,7 @@ public override void should_set_the_list_items()
181188
}
182189
}
183190

191+
[TestFixture]
184192
public class When_an_list_property_with_a_public_setter_is_set : When_a_list_property_with_is_set_successfully
185193
{
186194
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -198,6 +206,7 @@ public override void should_set_the_list_items()
198206
}
199207
}
200208

209+
[TestFixture]
201210
public class When_a_list_property_with_a_backing_field_is_set : With_list_entity
202211
{
203212
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -224,6 +233,7 @@ public void should_tell_which_property_failed_to_be_set()
224233
}
225234
}
226235

236+
[TestFixture]
227237
public class When_a_list_property_is_set_with_a_custom_setter_that_fails : With_list_entity
228238
{
229239
protected override Expression<Func<ListEntity, IEnumerable>> GetPropertyExpression()
@@ -272,6 +282,7 @@ public override void establish_context()
272282
}
273283
}
274284

285+
[TestFixture]
275286
public class When_the_checked_list_is_equal_to_the_expected_list : With_initialized_list
276287
{
277288
public override void establish_context()
@@ -292,6 +303,7 @@ public void should_succeed()
292303
}
293304
}
294305

306+
[TestFixture]
295307
public class When_the_checked_list_has_transposed_items_of_the_expected_list : With_initialized_list
296308
{
297309
public override void establish_context()
@@ -319,6 +331,7 @@ public void should_tell_that_the_list_element_count_does_not_match()
319331
}
320332
}
321333

334+
[TestFixture]
322335
public class When_the_checked_list_does_not_have_the_same_number_of_elements_as_the_expected_list : With_initialized_list
323336
{
324337
public override void establish_context()
@@ -346,6 +359,7 @@ public void should_tell_that_the_list_element_count_does_not_match()
346359
}
347360
}
348361

362+
[TestFixture]
349363
public class When_the_checked_list_is_null : With_initialized_list
350364
{
351365
public override void establish_context()
@@ -373,6 +387,7 @@ public void should_tell_that_actual_list_is_null()
373387
}
374388
}
375389

390+
[TestFixture]
376391
public class When_the_expected_list_is_null : With_initialized_list
377392
{
378393
public override void establish_context()
@@ -452,6 +467,7 @@ public void should_perform_the_check_with_the_custom_equality_comparer()
452467
}
453468
}
454469

470+
[TestFixture]
455471
public class When_a_list_is_checked_with_a_custom_equality_comparer_that_fails : With_initialized_list
456472
{
457473
private InvalidOperationException exception;
@@ -482,6 +498,7 @@ public void should_fail_with_the_exception_from_the_equality_comparer()
482498
}
483499
}
484500

501+
[TestFixture]
485502
public class When_the_checked_typed_set_is_equal_to_the_expected_list : With_initialized_list
486503
{
487504
public override void establish_context()
@@ -506,6 +523,7 @@ public void should_succeed()
506523
}
507524
}
508525

526+
[TestFixture]
509527
public class When_the_checked_set_is_equal_to_the_expected_list : With_initialized_list
510528
{
511529
public override void establish_context()
@@ -530,6 +548,7 @@ public void should_succeed()
530548
}
531549
}
532550

551+
[TestFixture]
533552
public class When_the_collection_is_equal_to_the_expected_list : With_initialized_list
534553
{
535554
public override void establish_context()
@@ -554,6 +573,7 @@ public void should_succeed()
554573
}
555574
}
556575

576+
[TestFixture]
557577
public class When_the_typed_list_is_equal_to_the_expected_list : With_initialized_list
558578
{
559579
public override void establish_context()
@@ -578,6 +598,7 @@ public void should_succeed()
578598
}
579599
}
580600

601+
[TestFixture]
581602
public class When_the_checked_array_is_equal_to_the_expected_list : With_initialized_list
582603
{
583604
public override void establish_context()

0 commit comments

Comments
 (0)