Skip to content

Commit ab854d5

Browse files
committed
Move ApplyDefaultIdentifierConventions call to Configuration static constructor to fix failing test
1 parent 2eb7493 commit ab854d5

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

Slapper.AutoMapper.Tests/PerformanceTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public void Simple_Performance_Test()
6666

6767
// Act
6868
Stopwatch stopwatch = Stopwatch.StartNew();
69-
70-
var customers = Slapper.AutoMapper.Map<Customer>( list );
69+
var customers = AutoMapper.Map<Customer>( list );
70+
stopwatch.Stop();
7171

7272
// Assert
7373
Assert.NotNull( customers );
@@ -118,8 +118,8 @@ public void Complex_Performance_Test()
118118

119119
// Act
120120
Stopwatch stopwatch = Stopwatch.StartNew();
121-
122-
var customers = Slapper.AutoMapper.Map<Customer>( list );
121+
var customers = AutoMapper.Map<Customer>( list );
122+
stopwatch.Stop();
123123

124124
// Assert
125125
Assert.NotNull( customers );

Slapper.AutoMapper/Slapper.AutoMapper.Configuration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static Configuration()
4848
{
4949
IdentifierAttributeType = typeof(Id);
5050

51+
ApplyDefaultIdentifierConventions();
5152
ApplyDefaultTypeConverters();
5253
}
5354

Slapper.AutoMapper/Slapper.AutoMapper.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ namespace Slapper
4141
/// </summary>
4242
public static partial class AutoMapper
4343
{
44-
#region Constructor
45-
46-
static AutoMapper()
47-
{
48-
Configuration.ApplyDefaultIdentifierConventions();
49-
}
50-
51-
#endregion Constructor
52-
5344
#region Attributes
5445

5546
/// <summary>

0 commit comments

Comments
 (0)