public void Setup() { _httpClient = Substitute.For <IRestClient>(); _sut = new IuguApiClient(_httpClient); _restResponse = Substitute.For <IRestResponse <Models.IuguClient> >(); _createdClient = new Models.IuguClient("1", email: "*****@*****.**"); _editedClient = new Models.IuguClient("1", email: "*****@*****.**", name: "Fulano"); _deletedClient = new Models.IuguClient("1", email: "*****@*****.**", name: "Fulano"); }
public void Setup() { _httpClient = Substitute.For<IRestClient>(); _sut = new IuguApiClient(_httpClient); _restResponse = Substitute.For<IRestResponse<Models.IuguClient>>(); _createdClient = new Models.IuguClient("1", email: "*****@*****.**"); _editedClient = new Models.IuguClient("1", email: "*****@*****.**", name: "Fulano"); _deletedClient = new Models.IuguClient("1", email: "*****@*****.**", name: "Fulano"); }
public void WhenIRequestTheClientToBeEditedSync() { _restResponse.Data.Returns(_editedClient); _httpClient.ExecuteTaskAsync <Models.IuguClient>(Arg.Any <IRestRequest>()).ReturnsForAnyArgs(_restResponse); _editedClient = _sut.UpdateClientSync(_client); }
public void WhenIRequestTheClientToBeEdited() { _restResponse.Data.Returns(_editedClient); _httpClient.ExecuteTaskAsync <Models.IuguClient>(Arg.Any <IRestRequest>()).ReturnsForAnyArgs(_restResponse); _editedClient = _sut.UpdateClient(new Models.IuguClient("1", email: "*****@*****.**")).Result; }
public void WhenIRequestTheClientToBeAdded() { _restResponse.Data.Returns(_createdClient); _httpClient.ExecuteTaskAsync <Models.IuguClient>(Arg.Any <IRestRequest>()).ReturnsForAnyArgs(_restResponse); _createdClient = _sut.CreateClient(_client).Result; }
public void GivenAClient() { _client = new Models.IuguClient("1", email: "*****@*****.**"); _clientToBeEdited = new Models.IuguClient("1", "*****@*****.**", name: "Fulano"); }
public void WhenIRequestTheClientToBeEditedSync() { _restResponse.Data.Returns(_editedClient); _httpClient.ExecuteTaskAsync<Models.IuguClient>(Arg.Any<IRestRequest>()).ReturnsForAnyArgs(_restResponse); _editedClient = _sut.UpdateClientSync(_client); }
public void WhenIRequestTheClientToBeEdited() { _restResponse.Data.Returns(_editedClient); _httpClient.ExecuteTaskAsync<Models.IuguClient>(Arg.Any<IRestRequest>()).ReturnsForAnyArgs(_restResponse); _editedClient = _sut.UpdateClient(new Models.IuguClient("1", email: "*****@*****.**")).Result; }
public void WhenIRequestTheClientToBeAdded() { _restResponse.Data.Returns(_createdClient); _httpClient.ExecuteTaskAsync<Models.IuguClient>(Arg.Any<IRestRequest>()).ReturnsForAnyArgs(_restResponse); _createdClient = _sut.CreateClient(_client).Result; }
public void GivenAClient() { _client = new Models.IuguClient("1", email: "*****@*****.**"); _clientToBeEdited = new Models.IuguClient("1", "*****@*****.**", name: "Fulano"); }