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

            tag.Should().Be("sometag");
            uri.Should().Be("image");
        }
Esempio n. 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");
        }
Esempio n. 5
0
        public void WhenEmptyTagIsDefined_ThenReturnItAsLatest()
        {
            var(uri, tag) = ImageUriParser.ParseUri("domain.eu/image");

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

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