Beispiel #1
0
        public void TestMaakAccountAan()
        {
            AccountContext context = new AccountContext();

            Registreren registereer = new Registreren
            {
                Email          = "*****@*****.**",
                Wachtwoord     = "wachtwoord",
                Gebruikersnaam = "unittest"
            };

            try
            {
                context.Insert(registereer);
            }
            catch (DuplicateNameException)
            {
            }

            Account account = new Account
            {
                Email      = "*****@*****.**",
                Wachtwoord = "wachtwoord",
            };
            Account accountOphalen = context.Select(account);

            Assert.IsNotNull(accountOphalen);
        }
Beispiel #2
0
        public void TestNiet2ZelfdeAccounts()
        {
            AccountContext context = new AccountContext();

            Registreren registereer = new Registreren
            {
                Email          = "*****@*****.**",
                Wachtwoord     = "wachtwoord",
                Gebruikersnaam = "unittest"
            };

            Assert.ThrowsException <DuplicateNameException>(() => context.Insert(registereer));
        }