예제 #1
0
        public void UuidArgument_ParseShouldSucceed_WithDifferentCapitalisation()
        {
            // Arrange
            UuidArgument  argument = new UuidArgument();
            IStringReader reader   = new StringReader("1-2-3-aA-fF");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }
예제 #2
0
        public void UuidArgument_ParseShouldFail_IncompleteUuid()
        {
            // Arrange
            UuidArgument  argument = new UuidArgument();
            IStringReader reader   = new StringReader("1-2-3");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
예제 #3
0
        public void UuidArgument_ShouldHaveTrailingCharacters()
        {
            // Arrange
            UuidArgument  argument = new UuidArgument();
            IStringReader reader   = new StringReader("1-2-3-4-5!!!");

            // Act
            argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(reader.CanRead(3));
        }
예제 #4
0
        public void UuidArgument_ParseShouldSucceed()
        {
            // Arrange
            UuidArgument  argument = new UuidArgument();
            IStringReader reader   = new StringReader("1-2-3-4-5");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }