public void ParseShouldReturnOptionGuidNone() { // Arrange var input = "not a Guid"; Option <Guid> expected = None; // Act var result = GuidType.Parse(input); // Assert result.Should().Be(expected); }
public void ParseShouldReturnOptionGuidSomeWhenInputFormat4HexadecimalsEnclosedInBracesWithTheFourthSubsetOf8HexadecimalsEnclosedInBraces() { // Arrange var originalGuid = Guid.NewGuid(); var input = originalGuid.ToString("X"); Option <Guid> expected = Some(originalGuid); // Act var result = GuidType.Parse(input); // Assert result.Should().Be(expected); }
public void ParseShouldReturnOptionGuidSomeWhenInputFormat32DigitsSeparatedByHyphensEnclosedInParentheses() { // Arrange var originalGuid = Guid.NewGuid(); var input = originalGuid.ToString("P"); Option <Guid> expected = Some(originalGuid); // Act var result = GuidType.Parse(input); // Assert result.Should().Be(expected); }