public void CorrectRequestForCreate()
        {
            var factory       = Substitute.For <IConnection>();
            var volumesClient = new VolumesClient(factory);

            var data = new Models.Requests.Volume();

            volumesClient.Create(data);
            factory.Received().ExecuteRequest <Volume>("volumes", null, data, "volume", Method.POST);
        }
 /// <summary>
 /// Create a new Block Storage volume
 /// </summary>
 public Task <Volume> Create(Models.Requests.Volume volume)
 {
     return(_connection.ExecuteRequest <Volume>("volumes", null, volume, "volume", Method.POST));
 }
Beispiel #3
0
 public Task <Volume> Create(Models.Requests.Volume volume, CancellationToken token = new CancellationToken())
 {
     return(_connection.ExecuteRequest <Volume>("volumes", null, volume, "volume", Method.POST, token));
 }