public void ParseReturnsGuidName() { // Fixture setup // Exercise system var parseResult = GuidName.Parse("<GUID=da1432ec-c560-40cf-9a75-bc8b77336082>"); // Verify outcome parseResult.ToString().Should().Be("<GUID=da1432ec-c560-40cf-9a75-bc8b77336082>"); }
public void CorrectExceptionShouldBeThrownForInvalidValueOnParse() { // Fixture setup // Exercise system Action call = () => GuidName.Parse("Hello"); // Verify outcome call.Should().Throw <ArgumentOutOfRangeException>() .WithMessage("String 'Hello' can not be converted to valid GuidName instance."); }
public void CorrectExceptionShouldBeThrownForNullOrWhiteSpaceValueOnParse(string value) { // Fixture setup // Exercise system Action call = () => GuidName.Parse(value); // Verify outcome call.Should().Throw <ArgumentOutOfRangeException>() .WithMessage("GuidName string can not be null or white space."); }