Skip to content

Commit e4c1846

Browse files
committed
Rename and restructure migration specs: when_appending_event_with_registered_migration
Replace when_appending_event_with_migrations/ with the correctly named when_appending_event_with_registered_migration/ folder. The old spec files used names like 'with_a_registered_migration_when_appending_a_generation_1_event' which violated the rule of embedding 'when' inside a preposition-prefixed name. New flat structure — the 'registered migration' context is baked into the when_ folder name; the three outcomes are flat files at the same level: - and_event_is_generation_1 - and_event_is_generation_2 - and_event_has_default_value
1 parent 91216d9 commit e4c1846

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/ContractSigned.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/ContractSigned.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using Cratis.Chronicle.Events;
55

6-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
6+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
77

88
/// <summary>
99
/// Generation 1 of <see cref="ContractSigned"/>. Has only a contract identifier.

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/ContractSignedMigrator.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/ContractSignedMigrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Cratis.Chronicle.Events;
55
using Cratis.Chronicle.Events.Migrations;
66

7-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
7+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
88

99
/// <summary>
1010
/// Migrates <see cref="ContractSigned"/> from generation 1 to generation 2.

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/EmployeeRegistered.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/EmployeeRegistered.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using Cratis.Chronicle.Events;
55

6-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
6+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
77

88
[EventType(generation: 2)]
99
public record EmployeeRegistered(string FirstName, string LastName);

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/EmployeeRegisteredMigrator.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/EmployeeRegisteredMigrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Cratis.Chronicle.Events;
55
using Cratis.Chronicle.Events.Migrations;
66

7-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
7+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
88

99
/// <summary>
1010
/// Migrates <see cref="EmployeeRegistered"/> between generations 1 and 2.

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/PersonRegistered.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/PersonRegistered.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using Cratis.Chronicle.Events;
55

6-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
6+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
77

88
[EventType]
99
public record PersonRegistered(string FirstName, string LastName);

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/PersonRegisteredMigrator.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/PersonRegisteredMigrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Cratis.Chronicle.Events;
55
using Cratis.Chronicle.Events.Migrations;
66

7-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
7+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
88

99
/// <summary>
1010
/// Migrates <see cref="PersonRegistered"/> between generations 1 and 2.

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/with_a_registered_migration_when_appending_event_with_default_value.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/and_event_has_default_value.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using Cratis.Chronicle.EventSequences;
66
using MongoDB.Bson;
77
using MongoDB.Driver;
8-
using context = Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations.with_a_registered_migration_when_appending_event_with_default_value.context;
8+
using context = Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration.and_event_has_default_value.context;
99

10-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
10+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
1111

1212
[Collection(ChronicleCollection.Name)]
13-
public class with_a_registered_migration_when_appending_event_with_default_value(context context) : Given<context>(context)
13+
public class and_event_has_default_value(context context) : Given<context>(context)
1414
{
1515
public class context(ChronicleInProcessFixture chronicleInProcessFixture) : Specification(chronicleInProcessFixture)
1616
{

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/with_a_registered_migration_when_appending_a_generation_1_event.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/and_event_is_generation_1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using Cratis.Chronicle.EventSequences;
66
using MongoDB.Bson;
77
using MongoDB.Driver;
8-
using context = Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations.with_a_registered_migration_when_appending_a_generation_1_event.context;
8+
using context = Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration.and_event_is_generation_1.context;
99

10-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
10+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
1111

1212
[Collection(ChronicleCollection.Name)]
13-
public class with_a_registered_migration_when_appending_a_generation_1_event(context context) : Given<context>(context)
13+
public class and_event_is_generation_1(context context) : Given<context>(context)
1414
{
1515
public class context(ChronicleInProcessFixture chronicleInProcessFixture) : Specification(chronicleInProcessFixture)
1616
{

Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_migrations/with_a_registered_migration_when_appending_a_generation_2_event.cs renamed to Integration/DotNET.InProcess/for_EventSequence/when_appending_event_with_registered_migration/and_event_is_generation_2.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using Cratis.Chronicle.EventSequences;
66
using MongoDB.Bson;
77
using MongoDB.Driver;
8-
using context = Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations.with_a_registered_migration_when_appending_a_generation_2_event.context;
8+
using context = Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration.and_event_is_generation_2.context;
99

10-
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_migrations;
10+
namespace Cratis.Chronicle.InProcess.Integration.for_EventSequence.when_appending_event_with_registered_migration;
1111

1212
[Collection(ChronicleCollection.Name)]
13-
public class with_a_registered_migration_when_appending_a_generation_2_event(context context) : Given<context>(context)
13+
public class and_event_is_generation_2(context context) : Given<context>(context)
1414
{
1515
public class context(ChronicleInProcessFixture chronicleInProcessFixture) : Specification(chronicleInProcessFixture)
1616
{

0 commit comments

Comments
 (0)