Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,24 @@
<!-- Drives test-host executables as supervised worker processes from the Nuke build
(build/SupervisedTests.cs): class-partitioned parallel workers, per-lane environments,
and honest retry reporting. Referenced ONLY by the build project. -->
<PackageVersion Include="Bobcat.Supervisor" Version="0.60.4" />
<PackageVersion Include="Bobcat.Supervisor" Version="1.0.0-rc.1" />
<!-- Bobcat itself, for the leadership-election compliance specifications in Wolverine.ComplianceTests and
for WolverineFx.Bobcat / WolverineFx.Bobcat.Http and their tests (GH-4833). -->
<PackageVersion Include="Bobcat" Version="1.0.0-alpha.1" />
<PackageVersion Include="Bobcat.Xunit" Version="1.0.0-alpha.1" />
<PackageVersion Include="Bobcat.Generators" Version="1.0.0-alpha.1" />
for WolverineFx.Bobcat / WolverineFx.Bobcat.Http, their tests and the samples that dogfood them (GH-4833).
Everything that takes Bobcat is on one version; the 0.60.4 hold for WolverineFx.Bobcat ended with
1.0.0-rc.1, which fixed JasperFx/bobcat#672. -->
<PackageVersion Include="Bobcat" Version="1.0.0-rc.1" />
<PackageVersion Include="Bobcat.Xunit" Version="1.0.0-rc.1" />
<PackageVersion Include="Bobcat.Generators" Version="1.0.0-rc.1" />
</ItemGroup>
<PropertyGroup>
<!-- WolverineFx.Bobcat, WolverineFx.Bobcat.Http, their tests and the two samples that dogfood them stay on 0.60.4
(VersionOverride="$(WolverineFxBobcatBobcatVersion)") until they can move to 1.0 without rewriting their
suite around an upstream bug: on 1.0.0-alpha.1 ThenSingleReadModel no longer refuses a MultiStreamProjection
when the scenario has no stream (JasperFx/bobcat#672). The move also has to take the intended 1.0 changes:
value aliases render as "#theAppointment" (bobcat#640, 12 tests) and a single read with no stream reads the
one document in the store (bobcat#616, 1 test). None of these projects references Wolverine.ComplianceTests. -->
<WolverineFxBobcatBobcatVersion>0.60.4</WolverineFxBobcatBobcatVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="JasperFx" Version="2.90.1" />
<PackageVersion Include="JasperFx.Events" Version="2.90.1" />
<PackageVersion Include="JasperFx.Events.SourceGenerator" Version="2.90.1" />
<PackageVersion Include="JasperFx.Events.InMemory" Version="2.90.1" />
<PackageVersion Include="JasperFx" Version="2.90.2" />
<PackageVersion Include="JasperFx.Events" Version="2.90.2" />
<PackageVersion Include="JasperFx.Events.SourceGenerator" Version="2.90.2" />
<PackageVersion Include="JasperFx.Events.InMemory" Version="2.90.2" />
<!-- RuntimeCompiler is on its own 5.x line (the Roslyn compiler package) — not the 2.1.x
family; it stays at 5.0.0. -->
<PackageVersion Include="JasperFx.RuntimeCompiler" Version="5.0.0" />
<PackageVersion Include="JasperFx.SourceGenerator" Version="2.90.1" />
<PackageVersion Include="JasperFx.SourceGenerator" Version="2.90.2" />
<PackageVersion Include="Lamar.Microsoft.DependencyInjection" Version="16.0.0" />
<PackageVersion Include="Marten" Version="9.50.3" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.1.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bobcat.Xunit" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Xunit" />
<!-- The source generator: marker comments, and the spec manifest the bobcat tool lists from -->
<PackageReference Include="Bobcat.Generators" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Generators" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit.v3" />
<!-- IDE discovery (Rider, Visual Studio): Bobcat warns BOBCAT033 without these. `dotnet test` and CI run
Expand Down
4 changes: 2 additions & 2 deletions src/Bobcat/Wolverine.Bobcat.Http.Tests/posting_commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async Task the_route_is_resolved_from_the_request_type_and_the_whole_voca
recording.GatheredFailures().ShouldBeNull();

var when = recording.Steps[0];
when.Text.ShouldBe("ConfirmAppointmentRequest(AppointmentId: theAppointment) is posted to \"/api/appointments/confirm\"");
when.Text.ShouldBe("ConfirmAppointmentRequest(AppointmentId: #theAppointment) is posted to \"/api/appointments/confirm\"");
when.Cells.Single(x => x.Name == "status").DisplayText.ShouldBe("200");
}

Expand All @@ -46,7 +46,7 @@ public async Task a_partial_command_is_built_once_so_the_route_and_the_body_agre
});

recording.GatheredFailures().ShouldBeNull();
recording.Steps[0].Text.ShouldBe($"CancelAppointment(AppointmentId: theAppointment) is posted to \"/api/appointments/{id}/cancel\"");
recording.Steps[0].Text.ShouldBe($"CancelAppointment(AppointmentId: #theAppointment) is posted to \"/api/appointments/{id}/cancel\"");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public async Task put_resolves_the_route_from_the_request_type()
});

recording.GatheredFailures().ShouldBeNull();
recording.Steps[0].Text.ShouldBe($"RenamePatient(AppointmentId: theAppointment, Patient: \"Bea\") is put to \"/api/appointments/{id}/patient\"");
recording.Steps[0].Text.ShouldBe($"RenamePatient(AppointmentId: #theAppointment, Patient: \"Bea\") is put to \"/api/appointments/{id}/patient\"");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bobcat.Xunit" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Xunit" />
<!-- The source generator: marker comments, and the spec manifest the bobcat tool lists from -->
<PackageReference Include="Bobcat.Generators" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Generators" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit.v3" />
<!-- IDE discovery (Rider, Visual Studio): Bobcat warns BOBCAT033 without these. `dotnet test` and CI run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public async Task given_events_by_id_alone_arranges_a_stream_with_no_aggregate_t
ThenEvents(typeof(CallLogged));
});

recording.Steps.First().Text.ShouldBe("stream theCall has already recorded CallStarted(Id: theCall, Caller: \"Ann\")");
recording.Steps.First().Text.ShouldBe("stream #theCall has already recorded CallStarted(Id: #theCall, Caller: \"Ann\")");
recording.Steps.ShouldAllBe(x => x.Status == ResultStatus.success);
recording.GatheredFailures().ShouldBeNull();

Expand Down
12 changes: 6 additions & 6 deletions src/Bobcat/Wolverine.Bobcat.Tests/dcb_tags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public async Task an_events_tags_read_on_its_one_row_by_the_names_the_spec_gave_

recording.GatheredFailures().ShouldBeNull();
var values = recording.Steps.Last().Cells.Single(x => x.Name == "values");
values.DisplayText.ShouldBe("Seat: 4C, tags: [theScreeningId, CustomerId(CUST-104)]");
values.DisplayText.ShouldBe("Seat: \"4C\", tags: [#theScreeningId, CustomerId(CUST-104)]");
}

[Fact]
Expand All @@ -148,8 +148,8 @@ await GivenEvents<SeatAvailability>(theScreeningId.Value,
});

recording.GatheredFailures().ShouldBeNull();
recording.Steps[0].Text.ShouldBe("SeatAvailability theScreeningId has already recorded ScreeningScheduled(Screening: theScreeningId, Seats: 2) tagged [theScreeningId]");
recording.Steps.Last().Text.ShouldBe("the SeatAvailability over events tagged theScreeningId matches");
recording.Steps[0].Text.ShouldBe("SeatAvailability #theScreeningId has already recorded ScreeningScheduled(Screening: #theScreeningId, Seats: 2) tagged [#theScreeningId]");
recording.Steps.Last().Text.ShouldBe("the SeatAvailability over events tagged #theScreeningId matches");

(await TheDcbModel<SeatAvailability>(EventTagQuery.For(theScreeningId)))!.Seats.ShouldBe(1);
}
Expand Down Expand Up @@ -294,9 +294,9 @@ public async Task the_boundary_steps_read_as_the_specification_says_them()

recording.GatheredFailures().ShouldBeNull();
var steps = recording.Steps.TakeLast(3).Select(x => x.Text).ToArray();
steps[0].ShouldBe("the consistency boundary is events tagged theScreeningId (ScreeningScheduled, SeatReserved)");
steps[1].ShouldBe("a concurrent SeatReserved tagged [theScreeningId] would conflict");
steps[2].ShouldBe("a concurrent ScreeningRenamed tagged [theScreeningId] would not conflict");
steps[0].ShouldBe("the consistency boundary is events tagged #theScreeningId (ScreeningScheduled, SeatReserved)");
steps[1].ShouldBe("a concurrent SeatReserved tagged [#theScreeningId] would conflict");
steps[2].ShouldBe("a concurrent ScreeningRenamed tagged [#theScreeningId] would not conflict");

recording.Steps[^3].Cells.Single(x => x.Name == "boundary").Status.ShouldBe(ResultStatus.success);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Bobcat/Wolverine.Bobcat.Tests/given_when_then.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public async Task an_arranged_stream_an_act_and_the_events_it_appended_render_as
{
// The id reads as the variable it was declared as, and a value that fits on the line is
// shown whole; AppointmentScheduled does not fit, so its values are a table under the step
"Given Appointment theAppointment has already recorded AppointmentScheduled",
"When ConfirmAppointment(AppointmentId: theAppointment) is received",
"Given Appointment #theAppointment has already recorded AppointmentScheduled",
"When ConfirmAppointment(AppointmentId: #theAppointment) is received",
"Then AppointmentConfirmed is emitted"
});

Expand Down Expand Up @@ -127,7 +127,7 @@ public async Task no_events_yet_renders_and_names_the_stream()
ThenEvents(typeof(AppointmentScheduled));
});

recording.Steps[0].Text.ShouldBe("Appointment theAppointment has no events yet");
recording.Steps[0].Text.ShouldBe("Appointment #theAppointment has no events yet");
recording.GatheredFailures().ShouldBeNull();
}

Expand Down
8 changes: 5 additions & 3 deletions src/Bobcat/Wolverine.Bobcat.Tests/modeled_read_models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task the_given_step_reads_as_only_what_the_partial_names()
await GivenReadModel<Dashboard>(Specify<Dashboard>().With(x => x.Status, "quiet"));
});

recording.Steps.First().Text.ShouldBe("the Dashboard read model is Dashboard(Status: quiet)");
recording.Steps.First().Text.ShouldBe("there is a Dashboard with Status: \"quiet\"");
}

[Fact]
Expand Down Expand Up @@ -92,7 +92,9 @@ public async Task a_single_read_model_refuses_a_multi_stream_projection()
[Fact]
public async Task a_single_read_model_needs_a_stream_to_be_about()
{
var failure = await Should.ThrowAsync<SpecCriticalException>(() => ThenSingleReadModel<Appointment>());
// Bobcat 1.0 (bobcat#616): with no stream, the single read is the one Appointment in the store, so
// none or several is an assertion failure naming why every Appointment counted, not a critical.
var failure = await Should.ThrowAsync<SpecificationFailedException>(() => ThenSingleReadModel<Appointment>());
failure.Message.ShouldContain("the act started none and the givens arranged none");
}

Expand Down Expand Up @@ -214,7 +216,7 @@ public async Task the_refusal_matches_the_members_a_partial_names()
});

recording.GatheredFailures().ShouldBeNull();
recording.Steps.Last().Text.ShouldBe("refused with AppointmentAlreadyConfirmed(AppointmentId: theAppointment)");
recording.Steps.Last().Text.ShouldBe("refused with AppointmentAlreadyConfirmed(AppointmentId: #theAppointment)");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/Bobcat/Wolverine.Bobcat.Tests/read_models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task a_read_model_that_disagrees_names_the_member()
});

var then = recording.Steps.Last();
then.Text.ShouldBe("the Appointment matches");
then.Text.ShouldBe("the Appointment #theAppointment matches");
then.Status.ShouldBe(ResultStatus.failed);
var confirmed = then.Cells.Single(x => x.Name == nameof(Appointment.Confirmed));
confirmed.Status.ShouldBe(ResultStatus.failed);
Expand All @@ -53,7 +53,7 @@ public async Task no_read_model_when_nothing_created_one()
});

recording.GatheredFailures().ShouldBeNull();
recording.Steps.Last().Text.ShouldBe("there is no Appointment theAppointment");
recording.Steps.Last().Text.ShouldBe("there is no Appointment #theAppointment");
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/Bobcat/Wolverine.Bobcat/Wolverine.Bobcat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ProjectReference Include="..\..\Wolverine\Wolverine.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bobcat" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Wolverine.Bobcat.Tests" />
Expand Down
2 changes: 1 addition & 1 deletion src/Bobcat/Wolverine.Bobcat/WolverineScenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private bool heardOn(AppendedEvents commit, IEventStore store, IReadOnlyList<Sto
{
if (marks.Count == 1) return true;
if (commit.Store is { } identity) return Equals(identity, store.Identity);
return hasStore() && ReferenceEquals(Store, store);
return hasStore() && ReferenceEquals(EventStore, store);
}

private ActOutcome mergeReadBack(ActOutcome outcome, CritterStackActOutcome readBack, IReadOnlyList<StoreHighWaterMark> marks)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

<ItemGroup>
<PackageReference Include="Alba" />
<PackageReference Include="Bobcat.Xunit" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Xunit" />
<!-- The source generator: marker comments, and the spec manifest the bobcat tool lists from -->
<PackageReference Include="Bobcat.Generators" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Generators" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit.v3" />
<!-- IDE discovery (Rider, Visual Studio): Bobcat warns BOBCAT033 without these. `dotnet test` and CI run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

<ItemGroup>
<PackageReference Include="Alba" />
<PackageReference Include="Bobcat.Xunit" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Xunit" />
<!-- The source generator: marker comments, and the spec manifest the bobcat tool lists from -->
<PackageReference Include="Bobcat.Generators" VersionOverride="$(WolverineFxBobcatBobcatVersion)" />
<PackageReference Include="Bobcat.Generators" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit.v3" />
<!-- IDE discovery (Rider, Visual Studio): Bobcat warns BOBCAT033 without these. `dotnet test` and CI run
Expand Down
Loading