fn ferox_responses_serialize() {
    let json_response = r#"{"type":"response","url":"https://nerdcore.com/css","path":"/css","wildcard":true,"status":301,"content_length":173,"line_count":10,"word_count":16,"headers":{"server":"nginx/1.16.1"}}"#;
    let response: FeroxResponse = serde_json::from_str(json_response).unwrap();

    let responses = FeroxResponses::default();
    responses.insert(response);
    // responses has a response now

    // serialized should be a list of responses
    let expected = format!("[{}]", json_response);

    let serialized = serde_json::to_string(&responses).unwrap();
    assert_eq!(expected, serialized);
}
/// given a FeroxResponses, test that it serializes into the proper JSON entry
given a FeroxResponses, test that it serializes into the proper JSON entry
given a FeroxResponses test that it serializes into the proper JSON entry
fn ferox_responses_serialize() {
    let json_response = r#"{"type":"response","url":"https://nerdcore.com/css","path":"/css","wildcard":true,"status":301,"content_length":173,"line_count":10,"word_count":16,"headers":{"server":"nginx/1.16.1"}}"#;
    let response: FeroxResponse = serde_json::from_str(json_response).unwrap();
    let responses = FeroxResponses::default();
    responses.insert(response);
    // responses has a response now
    // serialized should be a list of responses
    let expected = format!("[{}]", json_response);
    let serialized = serde_json::to_string(&responses).unwrap();
    assert_eq!(expected, serialized);
}
fn ferox_responses_serialize ( ) { let json_response = r#"{"type":"response","url":"https://nerdcore.com/css","path":"/css","wildcard":true,"status":301,"content_length":173,"line_count":10,"word_count":16,"headers":{"server":"nginx/1.16.1"}}"# ; let response : FeroxResponse = serde_json :: from_str ( json_response ) . unwrap ( ) ; let responses = FeroxResponses :: default ( ) ; responses . insert ( response ) ; // responses has a response now // serialized should be a list of responses let expected = format ! ( " " json_response ) ; let serialized = serde_json :: to_string ( & responses ) . unwrap ( ) ; assert_eq ! ( expected serialized ) ; }
given a FeroxResponses, test that it serializes into the proper JSON entry
given a FeroxResponses test that it serializes into the proper JSON entry