public void SystemInfo_CorrectAddresses()
 {
     Execute(
         c => c.GetSystemInfo(40),
         new[] {
         UnitRequest.Get("api/table.json?id=40&content=sysinfo&columns=_key,_value,_id,_adapter,_receivetime,_displayname&category=system"),
         UnitRequest.Get("api/table.json?id=40&content=sysinfo&columns=_name,_description,_class,_caption,_state,_serialnumber,_capacity,_receivetime,_displayname&category=hardware"),
         UnitRequest.Get("api/table.json?id=40&content=sysinfo&columns=_name,_vendor,_version,_date,_size,_receivetime,_displayname&category=software"),
         UnitRequest.Get("api/table.json?id=40&content=sysinfo&columns=_processid,_caption,_creationdate,_receivetime,_displayname&category=processes"),
         UnitRequest.Get("api/table.json?id=40&content=sysinfo&columns=_name,_description,_startname,_startmode,_state,_receivetime,_displayname&category=services"),
         UnitRequest.Get("api/table.json?id=40&content=sysinfo&columns=_domain,_user,_receivetime,_displayname&category=loggedonusers")
     }
         );
 }
        public async Task AdminTool_ApproveProbe_AllTypesAsync()
        {
            Func <int, ProbeApproval, string, Task> execute = async(id, action, str) =>
            {
                var urls = new[]
                {
                    UnitRequest.GetObjectProperty(id, "authorized"),
                    UnitRequest.Get($"api/probestate.htm?id={id}&action={str}")
                };

                await ExecuteAsync(async c => await c.ApproveProbeAsync(id, action), urls);
            };

            await execute(1001, ProbeApproval.Allow, "allow");
            await execute(1001, ProbeApproval.Deny, "deny");
            await execute(1001, ProbeApproval.AllowAndDiscover, "allowanddiscover");
        }
        public void AdminTool_ApproveProbe_AllTypes()
        {
            Action <int, ProbeApproval, string> execute = (id, action, str) =>
            {
                var urls = new[]
                {
                    UnitRequest.GetObjectProperty(id, "authorized"),
                    UnitRequest.Get($"api/probestate.htm?id={id}&action={str}")
                };

                Execute(c => c.ApproveProbe(id, action), urls);
            };

            execute(1001, ProbeApproval.Allow, "allow");
            execute(1001, ProbeApproval.Deny, "deny");
            execute(1001, ProbeApproval.AllowAndDiscover, "allowanddiscover");
        }