public void HasTagWithValueShouldGracefullyHandleNullTagsObject() { Site sut = new Site { Tags = null }; AzureModelExtensions.HasTagWithValue(sut, "test", "test").ShouldBeFalse(); }
public void HasTagWithValueShouldNotFindTagWhenItDoesNotExist() { Site sut = new Site { Tags = new Dictionary <string, string> { { "test", "test" } } }; AzureModelExtensions.HasTagWithValue(sut, "test", "test1").ShouldBeFalse(); }
public void HasTagWithValueShouldFindTagWhenValueMatches() { Site sut = new Site { Tags = new Dictionary <string, string> { { "test", "test" } } }; AzureModelExtensions.HasTagWithValue(sut, "test", "test").ShouldBeTrue(); }
public void HasTagShouldBeCaseSensitive() { Site sut = new Site { Tags = new Dictionary <string, string> { { "test", "test" } } }; AzureModelExtensions.HasTag(sut, "TEST").ShouldBeFalse(); }
public void HasTagShouldFindTagWhenItExists() { Site sut = new Site { Tags = new Dictionary <string, string> { { "test", "test" } } }; AzureModelExtensions.HasTag(sut, "test").ShouldBeTrue(); }
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))); }