public async Task PersistDataTestFail() { var model = TenantData.GetSecond(); model.Id = string.Empty; var persist = new Persist <Tenant> { Model = model }; await persist.Execute(); persist.Confirm.Success.Should().BeFalse(); }
public async Task PersistDataTestInsert() { using var store = GetDocumentStore(); using var session = store.OpenAsyncSession(); var model = TenantData.GetSecond(); model.Id = string.Empty; var persist = new Persist <Tenant> { Session = session, Model = model }; await persist.Execute(); persist.Confirm.Success.Should().BeTrue(); }
public async Task PersistDataTestUpdate() { using var store = GetDocumentStore(); using var session = store.OpenAsyncSession(); var loader = new Loader <Tenant> { Session = session, Id = TenantData.FirstId }; await loader.Execute(); loader.Result.Should().NotBeNull(); var persist = new Persist <Tenant> { Session = session, Model = loader.Result }; await persist.Execute(); persist.Confirm.Success.Should().BeTrue(); }