Ejemplo n.º 1
0
        public void CorrectRequestForCreateMany()
        {
            var factory = Substitute.For <IConnection>();
            var client  = new DropletsClient(factory);

            var body = new Models.Requests.Droplets();

            client.Create(body);

            factory.Received().ExecuteRequest <List <Droplet> >("droplets", null, body, "droplets", Method.POST);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// To create multiple Droplets.
 /// A Droplet will be created for each name you send using the associated information.
 /// Up to ten Droplets may be created at a time.
 /// </summary>
 public Task <IReadOnlyList <Droplet> > Create(Models.Requests.Droplets droplets)
 {
     return(_connection.ExecuteRequest <List <Droplet> >("droplets", null, droplets, "droplets", Method.POST)
            .ToReadOnlyListAsync());
 }