Skip to content

Commit

Permalink
UnitTest run by source generator
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Dec 19, 2024
1 parent 572a690 commit 0e94b7a
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 3,820 deletions.
8 changes: 5 additions & 3 deletions src/MasterMemory.Unity/Assets/Tests/ValidatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ public void PKUnique()

validateResult.IsValidationFailed.Should().BeTrue();
validateResult.FailedResults.Count.Should().Be(3); // Q:1,4 + I:2
validateResult.FailedResults[0].Message.Should().Be("Unique failed: QuestId, value = 1");
validateResult.FailedResults[1].Message.Should().Be("Unique failed: QuestId, value = 4");
validateResult.FailedResults[2].Message.Should().Be("Unique failed: ItemId, value = 2");
var faileds = validateResult.FailedResults.OrderBy(x => x.Message).ToArray();

faileds[0].Message.Should().Be("Unique failed: ItemId, value = 2");
faileds[1].Message.Should().Be("Unique failed: QuestId, value = 1");
faileds[2].Message.Should().Be("Unique failed: QuestId, value = 4");
}

// test IValidator
Expand Down
93 changes: 0 additions & 93 deletions tests/MasterMemory.Tests/Generated/DatabaseBuilder.cs

This file was deleted.

Loading

0 comments on commit 0e94b7a

Please sign in to comment.