Exemplo n.º 1
0
        public void RegisterDonatorTest()
        {
            Donator     donator     = new Donator("Popescu", "Ion", "M", DateTime.Parse("1998-02-12"), "Cluj-Napoca", "Cluj-Napoca", "Cluj", null, null, null, "0712121213", "*****@*****.**");
            UserDonator userDonator = new UserDonator("popescupopescu", "8287458823facb8ff918dbfabcd22ccb"); // parola este "parola"

            int count = donatorService.GetAllDonatori().Count;

            donatorService.RegisterDonator("popescupopescu", "parola", "Popescu", "Ion", "M", DateTime.Parse("1998-02-12"), "Cluj-Napoca", "Cluj-Napoca", "Cluj", null, null, null, "0712121213", "*****@*****.**");

            Assert.AreEqual(count + 1, donatorService.GetAllDonatori().Count);

            donatorService.DeleteDonatorAndUser(donator, userDonator);

            Assert.AreEqual(count, donatorService.GetAllDonatori().Count);
        }