public void AcceptEndpointAndObject() { var message = EveClient.DeleteAsync(Endpoint, Original).Result; Assert.AreEqual(HttpStatusCode.NoContent, message.StatusCode); // confirm that item has been deleted on remote message = EveClient.GetAsync(string.Format("{0}/{1}", Endpoint, Original.UniqueId)).Result; Assert.AreEqual(HttpStatusCode.NotFound, message.StatusCode); }
public void DeleteEndpointContent() { var message = EveClient.DeleteAsync(Endpoint).Result; Assert.AreEqual(HttpStatusCode.NoContent, message.StatusCode); // confirm that item has been deleted on remote var companies = EveClient.GetAsync <Company>(Endpoint).Result; Assert.AreEqual(HttpStatusCode.NoContent, message.StatusCode); Assert.AreEqual(0, companies.Count); }
public void AcceptEndpointConsiderImsAndSoftDeleteAndQuery() { System.Threading.Thread.Sleep(1000); var rawQuery = @"{""name"": ""Name2""}"; var result = EveClient.GetAsync <Company>(Endpoint, null, rawQuery: rawQuery).Result; Assert.AreEqual(HttpStatusCode.OK, EveClient.HttpResponse.StatusCode); Assert.AreEqual(result.Count, 1); var original3 = EveClient.PostAsync <Company>(Endpoint, new Company { Name = "Name3" }).Result; Assert.AreEqual(HttpStatusCode.Created, EveClient.HttpResponse.StatusCode); rawQuery = @"{""name"": ""Name3""}"; result = EveClient.GetAsync <Company>(Endpoint, null, rawQuery: rawQuery).Result; Assert.AreEqual(HttpStatusCode.OK, EveClient.HttpResponse.StatusCode); Assert.AreEqual(result.Count, 1); result = EveClient.GetAsync <Company>(Endpoint, original3.Updated, rawQuery).Result; Assert.AreEqual(HttpStatusCode.OK, EveClient.HttpResponse.StatusCode); Assert.AreEqual(result.Count, 0); result = EveClient.GetAsync <Company>(Endpoint, Original2.Updated, rawQuery).Result; Assert.AreEqual(HttpStatusCode.OK, EveClient.HttpResponse.StatusCode); Assert.AreEqual(result.Count, 1); var r = EveClient.DeleteAsync(Endpoint, original3).Result; Assert.AreEqual(HttpStatusCode.NoContent, r.StatusCode); result = EveClient.GetAsync <Company>(Endpoint, Original2.Updated, true).Result; Assert.AreEqual(HttpStatusCode.OK, EveClient.HttpResponse.StatusCode); Assert.AreEqual(1, result.Count); Assert.IsTrue(result[0].Deleted); }
public async Task ResourceArgumentNameNullException() { await EveClient.DeleteAsync(null, Original); }
public async Task BaseAddressPropertyNullExceptionAlt() { EveClient.BaseAddress = null; EveClient.ResourceName = "resource"; await EveClient.DeleteAsync(Original); }
public async Task BaseAddressPropertyNullException() { EveClient.BaseAddress = null; await EveClient.DeleteAsync("resource", Original); }
public async Task ResourceNamePropertyNullException() { await EveClient.DeleteAsync(Original); }
public async Task ObjArgumentNullException() { await EveClient.DeleteAsync("resource", null); }
public async Task ResourceNameArgumentException() { await EveClient.DeleteAsync(string.Empty, Original); }
public async Task ObjArgumentNullExceptionAlt() { EveClient.ResourceName = "resource"; await EveClient.DeleteAsync(null); }