Esempio n. 1
0
        public void ShouldCreateEventScriptAsync()
        {
            // Arrange
            ISystemApi         systemApi   = CreateSystemApi();
            EventScriptRequest eventScript = CreateEventScript();

            // Act
            EventScriptResponse response = systemApi.CreateEventScriptAsync("system.get.pre_process", new SqlQuery(), eventScript).Result;

            // Assert
            response.Name.ShouldBe("my_custom_script");
            response.Type.ShouldBe("v8js");

            Should.Throw <ArgumentNullException>(() => systemApi.CreateEventScriptAsync(null, new SqlQuery(), eventScript));
            Should.Throw <ArgumentNullException>(() => systemApi.CreateEventScriptAsync("system.get.pre_process", new SqlQuery(), null));
        }