Exemplo n.º 1
0
        public void CorrectRequestForGetFingerprint()
        {
            var factory = Substitute.For <IConnection>();
            var client  = new KeysClient(factory);

            client.Get("fingerprint");

            var parameters = Arg.Is <List <Parameter> >(list => (string)list[0].Value == "fingerprint");

            factory.Received().ExecuteRequest <Key>("account/keys/{id}", parameters, null, "ssh_key");
        }
Exemplo n.º 2
0
        public void CorrectRequestForGetId()
        {
            var factory = Substitute.For <IConnection>();
            var client  = new KeysClient(factory);

            client.Get(9001);

            var parameters = Arg.Is <List <Parameter> >(list => (int)list[0].Value == 9001);

            factory.Received().ExecuteRequest <Models.Responses.Key>("account/keys/{id}", parameters, null, "ssh_key");
        }