Skip to content

Commit 58bed37

Browse files
committed
fix(test): Correction of the test based on the behavior used in Mapster v10
1 parent 58efada commit 58bed37

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Mapster.Tests/WhenUsingDestinationValue.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ public void MapUsingDestinationValue()
4242
public void MappingToReadonlyPropertyWhenPocoDetectRegression()
4343
{
4444
var studentDto = new StudentDtoOrigin { Name = "Marta" };
45-
var student = studentDto.Adapt<StudentOrigin>(); // No exception.
4645

47-
student.Name.ShouldBe("John");
46+
Should.NotThrow(() =>
47+
{
48+
var student = studentDto.Adapt<StudentOrigin>(); // No exception.
49+
});
4850
}
4951

5052
[TestMethod]

0 commit comments

Comments
 (0)