private void CheckRegisterEmail() { bool register = true; newaccount = testContext.NewAccount(); testContext.AddAccountsToList(); foreach (Account mcaccount in testContext.Accountslist) { if (mcaccount.Email == newaccount.Email) { register = false; throw new EmailAlreadyExcistsException("We have seen this email before"); } } Assert.True(register); }