public async void DeleteSuccessAsync() { var model = new GetModelService().GetModel(); await _client.AddAsync(model); Assert.Equal(1L, await _client.DeleteAsync(model)); }
public async void AddAsync() { var model = new GetModelService().GetModel(); await _client.AddAsync(model); var result = _client.GetQueryable <TestModel>().FirstOrDefault(p => p.Id == model.Id); Assert.NotNull(result); Assert.Equal(model.ToJson(), result.ToJson()); }
public async void UpdateSuccessAsync() { var model = new GetModelService().GetModel(); await _client.AddAsync(model); model.Int = 199; model.String = Guid.NewGuid().ToString(); model.DateTimeUtc = DateTime.UtcNow; await _client.UpdateAsync(model); var result = _client.GetQueryable <TestModel>().FirstOrDefault(p => p.Id == model.Id); Assert.Equal(model.ToJson(), result.ToJson()); }