public void Equals_WhenSameTypeAndUnderlyingValue_ReturnsTrue() { var backingValue = Guid.NewGuid(); var id1 = new TestId(backingValue); var id2 = new TestId(backingValue); id1.Should().Be(id2); }
public void WithValidValue(string value, string expectedGuidValue) { // Arrange TestId testId = null; var expectedGuid = Guid.Parse(expectedGuidValue); // Act var exception = Record.Exception(() => testId = TestId.With(value)); Assert.Null(exception); // Assert testId.Should().NotBeNull(); testId.Value.Should().Be(value); testId.GetGuid().Should().Be(expectedGuid); }