Esempio n. 1
0
        public async Task Add_Action_Configurations()
        {
            m_actionConfiguration = new ActionConfiguration()
            {
                Name          = "UnitTestConfig",
                TemplateToken = "com.axis.action.fixed.notification.http"
            };

            //Action Template params
            m_actionConfiguration.Parameters.Add("parameters", "action=list");
            m_actionConfiguration.Parameters.Add("message", "Hello world!");
            //Recipient Template params
            m_actionConfiguration.Parameters.Add("upload_url", "http://10.21.66.24");
            m_actionConfiguration.Parameters.Add("login", "root");
            m_actionConfiguration.Parameters.Add("password", "pass");
            m_actionConfiguration.Parameters.Add("proxy_host", "");
            m_actionConfiguration.Parameters.Add("proxy_port", "");
            m_actionConfiguration.Parameters.Add("proxy_login", "");
            m_actionConfiguration.Parameters.Add("proxy_password", "");
            m_actionConfiguration.Parameters.Add("qos", "");

            ServiceResponse response = await actionService.AddActionConfigurationAsync(VALID_IP, VALID_USER, VALID_PASS, m_actionConfiguration);

            Console.WriteLine("[AddActionConfigurations] " + m_actionConfiguration.ConfigID);

            Assert.IsTrue(response.IsSuccess && m_actionConfiguration.ConfigID != 0);
        }