Esempio n. 1
0
        public async Task UpdateMemberInfoTest()
        {
            DatabaseSystem databaseSystem = new DatabaseSystem();
            Member         member         = new Member();

            member.MemberId   = "unitTest4";
            member.MemberName = "zxczxc";
            member.Password   = "******";
            member.Phone      = "0326598741";
            member.Birthday   = "10/10/1659";
            member.Sexuality  = "女";

            var result = await databaseSystem.UpdateMemberInfo(member);

            await databaseSystem.Delete("unitTest4", "Member");

            Assert.IsTrue(result);
        }
Esempio n. 2
0
        public async Task InitializationMemberDataTest()
        {
            DatabaseSystem databaseSystem = new DatabaseSystem();
            Member         member         = new Member();

            member.MemberId   = "unitTest4";
            member.MemberName = "zxczxc";
            member.Password   = "******";
            member.Phone      = "0326598741";
            member.Birthday   = "10/10/1659";
            member.Sexuality  = "女";

            await databaseSystem.UpdateMemberInfo(member);

            List <Member> memberList = await databaseSystem.InitializationMemberData();

            await databaseSystem.Delete("unitTest4", "Member");

            Assert.IsNotNull(memberList.Find(x => x.MemberId == "unitTest4"));
        }
Esempio n. 3
0
        public async Task UpdateInvitedListTest()
        {
            DatabaseSystem databaseSystem = new DatabaseSystem();
            Member         member         = new Member();

            member.MemberId   = "unitTest4";
            member.MemberName = "zxczxc";
            member.Password   = "******";
            member.Phone      = "0326598741";
            member.Birthday   = "10/10/1659";
            member.Sexuality  = "女";

            Dictionary <string, string> newInvitedList = new Dictionary <string, string>();

            newInvitedList.Add("1", "asd123");

            await databaseSystem.UpdateMemberInfo(member);

            var result = await databaseSystem.UpdateInvitedList("unitTest4", newInvitedList);

            await databaseSystem.Delete("unitTest4", "Member");

            Assert.IsTrue(result);
        }
Esempio n. 4
0
 public void UpdateMembe(string memberId)
 {
     _databaseSystem.UpdateMemberInfo(_memberHandler.GetMemberById(memberId));
 }