public void when_agent_config_is_missing_from_json_then_RpmConfig_is_not_null() { var serverConfiguration = ServerConfiguration.FromJson("{\"agent_run_id\":42}"); Assert.IsNotNull(serverConfiguration.RpmConfig); }
public void when_json_string_does_not_contain_required_fields_then_exception_is_thrown() { Assert.Throws <JsonSerializationException>(() => ServerConfiguration.FromJson("{}")); }
public IEnumerable <string> can_deserialize_integer_array_or_string_array_for_expected_status_codes(string json) { var serverConfiguration = ServerConfiguration.FromJson(json); return(serverConfiguration.RpmConfig.ErrorCollectorExpectedStatusCodes); }