private PingWebTestProperties CreatePingWebTestProperties(TestLocations testLocations, TestStatus testStatus, TestFrequency testFrequency, TestTimeout testTimeout, bool parseDependentRequests, RetriesForWebTestFailure retriesForWebTestFailure, int expectedHttpStatusCode = 200, AuthType authType = AuthType.None, string accessToken = null, string text = null)
        {
            var properties = new PingWebTestProperties()
            {
                Name          = this._name,
                Description   = string.Empty,
                TestStatus    = testStatus,
                TestFrequency = testFrequency,
                TestTimeout   = testTimeout,
                EnableRetriesForWebTestFailure = retriesForWebTestFailure,
                Locations          = WebTestLocations.GetWebTestLocations(testLocations),
                Configuration      = new PingWebTestConfiguration(this._name, this._url, (int)testTimeout, parseDependentRequests, expectedHttpStatusCode, authType, accessToken, text),
                SyntheticMonitorId = this._syntheticMonitorId,
            };

            return(properties);
        }
Beispiel #2
0
        public void Given_Locations_GetWebTestLocations_ShouldReturn_Results(TestLocations locations)
        {
            var results = WebTestLocations.GetWebTestLocations(locations);

            results.Count.Should().Be(2);
        }
Beispiel #3
0
        public void Given_InvalidLocation_GetWebTestLocations_ShouldThrow_Exception()
        {
            Action action = () => { var locations = WebTestLocations.GetWebTestLocations(TestLocations.None); };

            action.ShouldThrow <ArgumentException>();
        }