lisk-api-rust-client 0.1.0

Rust API Client for LISK Blockchain
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde_json::{from_str, Value};
use *;

#[test]
fn test_all_dapps() {
    let (_mock, body) = mock_http_request("dapps");
    {
        let client = mock_client();
        let actual = client.dapps.all().unwrap();
        let expected: Value = from_str(&body).unwrap();
        assert_eq!(
            actual.data[0].name,
            expected["data"][0]["name"].as_str().unwrap()
        );
    }
}