예제 #1
0
        public async Task <bool> UserCatalogueInsertTest()
        {
            UserCatalogue uc = new UserCatalogue();

            List <IUser> users = await uc.GetAllItems();

            int preNr = users.Count;

            IUser user = new Participant(0, "*****@*****.**", "p455w02d", "5417", "+4512345678", "Test Testersen", new List <Booking>());

            await uc.CreateItem(user);

            users = await uc.GetAllItems();

            int postNr = users.Count;

            return(preNr == postNr - 1);
        }
예제 #2
0
        public async Task <bool> UserCatalogueFindTest()
        {
            UserCatalogue uc = new UserCatalogue();

            List <IUser> users = await uc.GetAllItems();

            IUser        user         = users[0];
            List <IUser> usersWithKey = await uc.GetItemsWithKey(0, user.Id);

            string       userEmail = user.Email[1..(user.Email.Length - 1)];
예제 #3
0
        public async Task <bool> UserCatalogueReadTest()
        {
            UserCatalogue uc = new UserCatalogue();

            List <IUser> users = await uc.GetAllItems();

            int   id   = users[0].Id;
            IUser user = await uc.GetItem(new int[] { id });

            return(user.Id == users[0].Id);
        }