Example #1
0
 public void WhenImagesAreNotEqual_ThenEqualShouldReturnFalse()
 {
     ImageUriParser.ParseUri("image:sometag")
     .Equals(ImageUriParser.ParseUri("image:someothertag"))
     .Should()
     .Be(false);
 }
Example #2
0
 public void WhenImagesAreEqual_ThenEqualReturnsTrue()
 {
     ImageUriParser.ParseUri("image:sometag")
     .Equals(ImageUriParser.ParseUri("image:sometag"))
     .Should()
     .Be(true);
 }
Example #3
0
        public void WhenImageWithoutDomainIsGiven_ThenParseItAsExpected()
        {
            var(uri, tag) = ImageUriParser.ParseUri("image:sometag");

            tag.Should().Be("sometag");
            uri.Should().Be("image");
        }
Example #4
0
        public void WhenTagAndUriIsGiven_ThenParseResultsCorrectly()
        {
            var(uri, tag) = ImageUriParser.ParseUri("domain.eu/image:sometag");

            tag.Should().Be("sometag");
            uri.Should().Be("domain.eu/image");
        }
Example #5
0
        public void WhenEmptyTagIsDefined_ThenReturnItAsLatest()
        {
            var(uri, tag) = ImageUriParser.ParseUri("domain.eu/image");

            tag.Should().Be("latest");
            uri.Should().Be("domain.eu/image");
        }
Example #6
0
        public void WhenParsesInvalidFormatOfUri_ThenThrowError()
        {
            Action test = () => ImageUriParser.ParseUri(":sometag");

            test.Should().Throw <ArgumentException>();
        }