Skip to content

Commit

Permalink
Test coverage when the same segment is added twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Jan 2, 2025
1 parent 6c46e06 commit 133fc00
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Testing/Acceptance/Modules/Layouting/LayoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ public async Task TestMultiSegmentInName(TestEngine engine)
Assert.AreEqual("Hello World", await response.GetContentAsync());
}

[TestMethod]
public void TestSameSegmentTwice()
{
var content = Content.From(Resource.FromString("Hello World!"));

Assert.ThrowsException<InvalidOperationException>(() =>
{
Layout.Create().Add("one", content).Add("one", content);
});
}

[TestMethod]
[MultiEngineTest]
public async Task TestLazyBuilding(TestEngine engine)
Expand Down

0 comments on commit 133fc00

Please sign in to comment.