public async Task DeleteTest() { // Arrange var request = new StatusIdRequest { StatusId = "id" }; // Act var resultRaw = await this.statusStoreController.Delete(request); var result = resultRaw as OkResult; // Assert Assert.NotNull(result); await this.statusService.Received().UnsaveAsync(request.StatusId); }
public async Task PostRewteetTest() { // Arrange var request = new StatusIdRequest { StatusId = "status id" }; // Act var resultRaw = await this.retweetController.PostRewteet(request); var result = resultRaw as OkResult; // Assert Assert.NotNull(result); await this.statusService.Received().RetweetAsync(request.StatusId); }
public async Task <IHttpActionResult> Delete([FromUri] StatusIdRequest request) { await this.statusService.UnsaveAsync(request.StatusId); return(Ok()); }
public async Task <IHttpActionResult> Post(StatusIdRequest request) { await this.statusService.SaveAsync(request.StatusId); return(Ok()); }