public async Task DynamicSensorParameters_SensorQueryTarget_ParsesTargetAsync()
        {
            var client = Initialize_Client(new SensorQueryTargetValidatorResponse(new[]
            {
                UnitRequest.SensorTypes(1001), //Get initial target

                UnitRequest.SensorTypes(1001), //Verify specified target
                UnitRequest.BeginAddSensorQuery(1001, "snmplibrary_nolist", "APC+UPS.oidlib"),
                UnitRequest.AddSensorProgress(1001, 2),
                UnitRequest.EndAddSensorQuery(1001, 2)
            }));

            var target = (await client.GetSensorTypesAsync(1001)).First(t => t.Id == "snmplibrary").QueryTargets.First();

            await client.GetDynamicSensorParametersAsync(1001, "snmplibrary", queryParameters : target);
        }
        public async Task DynamicSensorParameters_SensorQueryParameters_ParsesParametersAsync()
        {
            var client = Initialize_Client(new SensorQueryTargetParametersValidatorResponse(new[]
            {
                UnitRequest.SensorTypes(1001),
                UnitRequest.BeginAddSensorQuery(1001, "ptfadsreplfailurexml"),
                UnitRequest.ContinueAddSensorQuery(2055, 7, "database_=XE&sid_type_=0&prefix_=0"),
                UnitRequest.AddSensorProgress(1001, 7),
                UnitRequest.EndAddSensorQuery(1001, 7)
            }));

            await client.GetDynamicSensorParametersAsync(1001, "ptfadsreplfailurexml", queryParameters : new SensorQueryTargetParameters
            {
                ["database"] = "XE",
                ["sid_type"] = 0,
                ["prefix"]   = 0
            });
        }
        public void DynamicSensorParameters_SensorQueryParameters_ParsesParameters_ContainingNewLines()
        {
            //The issue is that even though we encode our newlines, the response URI has then un-encoded. This causes our attempts to extract a tmpid to fail without specifying RegexOptions.Singleline
            var client = Initialize_Client(new SensorQueryTargetParametersValidatorResponse(new[]
            {
                UnitRequest.SensorTypes(1001),
                UnitRequest.BeginAddSensorQuery(1001, "ptfadsreplfailurexml"),
                UnitRequest.ContinueAddSensorQuery(2055, 7, "database_=First%0ASecond&sid_type_=0&prefix_=0"),
                UnitRequest.AddSensorProgress(1001, 7),
                UnitRequest.EndAddSensorQuery(1001, 7)
            })
            {
                DecodeNewlines = true
            });

            client.GetDynamicSensorParameters(1001, "ptfadsreplfailurexml", queryParameters: new SensorQueryTargetParameters
            {
                ["database"] = $"First\nSecond",
                ["sid_type"] = 0,
                ["prefix"]   = 0
            });
        }