public async void UpsertTicket() { // Arrange var provider = new NoSqlProvider(_configMock.Object); var ticket = new TestTicket { Created = DateTime.Now, Content = "test2" }; // Act var result = await provider.UpsertItemAsync(ticket, CancellationToken.None); // Assert Assert.True(result); // Cleanup await provider.DeleteItemAsync(ticket.Id, CancellationToken.None); }
public async void GetTicket() { // Arrange var provider = new NoSqlProvider(_configMock.Object); var ticket = new TestTicket { Created = DateTime.Now, Content = "test2" }; await provider.UpsertItemAsync(ticket, CancellationToken.None); // Act var result = await provider.GetItemAsync <Ticket>(ticket.Id, CancellationToken.None); // Assert Assert.NotNull(result); Assert.NotEqual(string.Empty, result.Content.Replace("Ubi_v1 t=", "")); Assert.True(result.Valid); // Cleanup await provider.DeleteItemAsync(ticket.Id, CancellationToken.None); }