public Property DeleteAsync_KnownId_ReturnsItem(StringNotNullAndContainsNoNulls id, BankClientProfile value) { Func <bool> rule = () => { value.Id = id.Item; BankClientProfile _ = _repo.UpsertAsync(value).Result; _dbMultiEntityMethods.SaveChangesAsync().Wait(); _repo.RemoveAsync(value).Wait(); _dbMultiEntityMethods.SaveChangesAsync().Wait(); return(_repo.GetAsync(id.Item).Result == null); }; return(rule.When(value != null)); }
public Property GetAsync_KnownId_ReturnsItem(StringNotNullAndContainsNoNulls id) { Func <bool> rule = () => { BankClientProfile value = new BankClientProfile { Id = id.Item }; BankClientProfile _ = _repo.UpsertAsync(value).GetAwaiter().GetResult(); _dbMultiEntityMethods.SaveChangesAsync().Wait(); return(_repo.GetAsync(id.Item).Result.Id == id.Item); }; return(rule.ToProperty()); }
public Property SetAsync_KnownId_ElementReplaced( StringNotNullAndContainsNoNulls id, BankClientProfile value, BankClientProfile value2) { Func <bool> rule = () => { value.Id = id.Item; value2.Id = id.Item; BankClientProfile _ = _repo.UpsertAsync(value).Result; BankClientProfile __ = _repo.UpsertAsync(value2).Result; _dbMultiEntityMethods.SaveChangesAsync().Wait(); BankClientProfile item = _repo.GetAsync(id.Item).Result; return(item.Id == id.Item && item.XFapiFinancialId == value2.XFapiFinancialId); }; // Run test avoiding C null character return(rule.When( value != null && value2 != null && value.XFapiFinancialId != value2.XFapiFinancialId)); }
public bool FsCheckStringNotNullAndContainsNoNulls_WorksCorrectly(StringNotNullAndContainsNoNulls s) { bool?outcome = !s.Item?.Contains("\0"); return(outcome ?? false); }