Skip to content

Commit

Permalink
Enhancing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
DyegoMaas committed Feb 25, 2022
1 parent 7e25715 commit 10018e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/ForeverFactory.Tests/Factories/CallbackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ public void should_execute_callback_through_ICustomizeOneBuildOneWithNavigation(
public void should_execute_callback_through_ICustomizeOneBuildManyWithNavigation()
{
string shipName = null;
var counter = 0;

Action<Ship> saveShipName = ship => shipName = ship.Name;
Action<Ship> saveShipName = ship =>
{
shipName = ship.Name;
counter++;
};
ICustomizeOneBuildManyWithNavigation<Ship> factory = MagicFactory.For<Ship>()
.One()
.PlusOne()
Expand All @@ -94,6 +99,7 @@ public void should_execute_callback_through_ICustomizeOneBuildManyWithNavigation
.ToArray();

shipName.Should().Be("Mary");
counter.Should().Be(1, "the first generator node does not configure a configure");
}

[Fact]
Expand Down

0 comments on commit 10018e5

Please sign in to comment.