protected void ExecuteLoadBalancerDeleteMethod(object[] invokeMethodInputParameters) { string serviceName = (string)ParseParameter(invokeMethodInputParameters[0]); string deploymentName = (string)ParseParameter(invokeMethodInputParameters[1]); string loadBalancerName = (string)ParseParameter(invokeMethodInputParameters[2]); var result = LoadBalancerClient.Delete(serviceName, deploymentName, loadBalancerName); WriteObject(result); }
public void CorrectRequestForDelete() { var factory = Substitute.For <IConnection>(); var client = new LoadBalancerClient(factory); client.Delete(10); var parameters = Arg.Is <List <Parameter> >(list => (int)list[0].Value == 10); factory.Received().ExecuteRaw("load_balancers/{id}", null, parameters, Method.DELETE); }