Exemplo n.º 1
0
        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>");
        }
Exemplo n.º 2
0
        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.");
        }
Exemplo n.º 3
0
        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.");
        }