Example #1
0
        public async Task InitializationModel()
        {
            List <Activity> activityData = await _databaseSystem.InitializationActivityData();

            _activityHandler = new ActivityHandler(activityData);
            List <Member> memberData = await _databaseSystem.InitializationMemberData();

            _memberHandler = new MemberHandler(memberData);
        }
Example #2
0
        public async Task InitializationActivityDataTest()
        {
            DatabaseSystem databaseSystem = new DatabaseSystem();
            Activity       activity       = new Activity();

            activity.ActivityId     = "99";
            activity.ActivityName   = "unitTest2";
            activity.HomeOwnerId    = "unitTest1";
            activity.ActivityDate   = "2020/02/02";
            activity.ActivityNote   = "unitTest";
            activity.NumberOfPeople = "3";
            await databaseSystem.InsertActivity(activity);

            List <Activity> activityList = await databaseSystem.InitializationActivityData();

            await databaseSystem.Delete("99", "Activity");

            Assert.IsNotNull(activityList.Find(x => x.ActivityId == "99"));
        }