Skip to content

Commit 7910bd2

Browse files
committed
Added missing processors to variety of tests
1 parent 2eff4b9 commit 7910bd2

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

tests/MongoFramework.Tests/Infrastructure/Mapping/Processors/EntityIdProcessorTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ public class ExplicitKeyOverridesImplicitIdModel
4747
[TestMethod]
4848
public void IdMapsOnAttribute()
4949
{
50-
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
5150
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
51+
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
5252
var definition = EntityMapping.RegisterType(typeof(IdByAttributeTestModel));
5353
Assert.AreEqual("MyCustomId", definition.GetIdName());
5454
}
5555

5656
[TestMethod]
5757
public void StringIdGeneratorOnStringProperty()
5858
{
59+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
5960
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
6061
EntityMapping.RegisterType(typeof(StringIdGeneratorTestModel));
6162

@@ -68,6 +69,7 @@ public void StringIdGeneratorOnStringProperty()
6869
[TestMethod]
6970
public void GuidIdGeneratorOnGuidProperty()
7071
{
72+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
7173
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
7274
EntityMapping.RegisterType(typeof(GuidIdGeneratorTestModel));
7375

@@ -80,6 +82,7 @@ public void GuidIdGeneratorOnGuidProperty()
8082
[TestMethod]
8183
public void ObjectIdGeneratorOnObjectIdProperty()
8284
{
85+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
8386
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
8487
EntityMapping.RegisterType(typeof(ObjectIdGeneratorTestModel));
8588

@@ -92,6 +95,7 @@ public void ObjectIdGeneratorOnObjectIdProperty()
9295
[TestMethod]
9396
public void ExplicitKeyOverridesImplicitId()
9497
{
98+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
9599
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
96100
EntityMapping.RegisterType(typeof(ExplicitKeyOverridesImplicitIdModel));
97101

tests/MongoFramework.Tests/Infrastructure/Mapping/Processors/EntityRelationshipProcessorTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ public void NavigationPropertiesUnmap()
181181
public void IdentifyCollectionRelationships()
182182
{
183183
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
184+
EntityMapping.AddMappingProcessor(new EntityIdProcessor());
184185
EntityMapping.AddMappingProcessor(new EntityRelationshipProcessor());
185186

186187
var definition = EntityMapping.RegisterType(typeof(CollectionMappingModel));

tests/MongoFramework.Tests/Infrastructure/Mapping/Processors/ExtraElementsProcessorTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public void ObeysIgnoreExtraElementsAttribute()
5353
[TestMethod]
5454
public void ObeysExtraElementsAttribute()
5555
{
56+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
5657
EntityMapping.AddMappingProcessor(new ExtraElementsProcessor());
5758
EntityMapping.RegisterType(typeof(ExtraElementsAttrModel));
5859

@@ -70,6 +71,7 @@ public void ObeysExtraElementsAttribute()
7071
public void ExtraElementsSerializationIntegrationTest()
7172
{
7273
EntityMapping.AddMappingProcessor(new CollectionNameProcessor());
74+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
7375
EntityMapping.AddMappingProcessor(new ExtraElementsProcessor());
7476
EntityMapping.RegisterType(typeof(ExtraElementsAttrModel));
7577
EntityMapping.RegisterType(typeof(ModelWithExtraElements));

tests/MongoFramework.Tests/Infrastructure/Mapping/Processors/NestedTypeProcessorTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class PropertyNestedModel
3333
[TestMethod]
3434
public void MapsNestedStandardPropertyModel()
3535
{
36+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
3637
EntityMapping.AddMappingProcessor(new NestedTypeProcessor());
3738
Assert.IsFalse(BsonClassMap.IsClassMapRegistered(typeof(PropertyNestedModel)));
3839
EntityMapping.RegisterType(typeof(PropertyBaseModel));
@@ -42,6 +43,7 @@ public void MapsNestedStandardPropertyModel()
4243
[TestMethod]
4344
public void MapsNestedCollectionPropertyModel()
4445
{
46+
EntityMapping.AddMappingProcessor(new PropertyMappingProcessor());
4547
EntityMapping.AddMappingProcessor(new NestedTypeProcessor());
4648
Assert.IsFalse(BsonClassMap.IsClassMapRegistered(typeof(CollectionNestedModel)));
4749
EntityMapping.RegisterType(typeof(CollectionBaseModel));

0 commit comments

Comments
 (0)