Beispiel #1
0
        public void TestValidate()
        {
            using var requests = new MockVultrRequests(
                      new HttpHandler("/account/info"));
            var agrix = new Agrix(
                Resources.SimpleConfig, new AgrixSettings("abc", requests.Url));

            agrix.Validate();
        }
Beispiel #2
0
        public void TestValidateServer(string configName)
        {
            using var requests = new MockVultrRequests(
                      new HttpHandler("/account/info"));
            var config = Resources.ResourceManager.GetString(configName);
            var agrix  = new Agrix(config, new AgrixSettings("abc", requests.Url));

            agrix.Validate();
        }
Beispiel #3
0
        public void TestValidateInvalidServer()
        {
            var agrix = new Agrix(Resources.InvalidServerConfig, BasicSettings);

            Assert.Throws <AgrixValidationException>(() => agrix.Validate());
        }
Beispiel #4
0
        public void TestValidateUnsupportedPlatform()
        {
            var agrix = new Agrix("platform:", BasicSettings);

            Assert.Throws <AgrixValidationException>(() => agrix.Validate());
        }
Beispiel #5
0
        public void TestValidatePlatformIsRequired()
        {
            var agrix = new Agrix("servers:", BasicSettings);

            Assert.Throws <AgrixValidationException>(() => agrix.Validate());
        }