Esempio n. 1
0
        public void HasTagWithValueShouldGracefullyHandleNullTagsObject()
        {
            Site sut = new Site
            {
                Tags = null
            };

            AzureModelExtensions.HasTagWithValue(sut, "test", "test").ShouldBeFalse();
        }
Esempio n. 2
0
        public void HasTagWithValueShouldNotFindTagWhenItDoesNotExist()
        {
            Site sut = new Site
            {
                Tags = new Dictionary <string, string>
                {
                    { "test", "test" }
                }
            };

            AzureModelExtensions.HasTagWithValue(sut, "test", "test1").ShouldBeFalse();
        }
Esempio n. 3
0
        public void HasTagWithValueShouldFindTagWhenValueMatches()
        {
            Site sut = new Site
            {
                Tags = new Dictionary <string, string>
                {
                    { "test", "test" }
                }
            };

            AzureModelExtensions.HasTagWithValue(sut, "test", "test").ShouldBeTrue();
        }
Esempio n. 4
0
        public void HasTagShouldBeCaseSensitive()
        {
            Site sut = new Site
            {
                Tags = new Dictionary <string, string>
                {
                    { "test", "test" }
                }
            };

            AzureModelExtensions.HasTag(sut, "TEST").ShouldBeFalse();
        }
Esempio n. 5
0
        public void HasTagShouldFindTagWhenItExists()
        {
            Site sut = new Site
            {
                Tags = new Dictionary <string, string>
                {
                    { "test", "test" }
                }
            };

            AzureModelExtensions.HasTag(sut, "test").ShouldBeTrue();
        }
Esempio n. 6
0
        public void HasWithValueTagShouldBeCaseInsensitiveForValue()
        {
            Site sut = new Site
            {
                Tags = new Dictionary <string, string>
                {
                    { "test", "test" }
                }
            };

            AzureModelExtensions.HasTagWithValue(sut, "test", "TEST").ShouldBeTrue();
        }
 public async Task <Site> GetProductionApiWebsiteAsync()
 {
     return((await GetWebsitesAsync()).Single(s => AzureModelExtensions.IsProductionApi(s)));
 }