Пример #1
0
        public void TestSelectByID()
        {
            MockUser tester = new MockUser();

            tester.createMockUser();
            List <User> result = tester.getUserByID(5);

            Assert.IsNotNull(result, "Seharusnya not null");
        }
Пример #2
0
        public void TestChangePassword()
        {
            MockUser tester = new MockUser();

            tester.createMockUser();
            tester.changePassword("123456789", 3);
            string      expected = "123456789";
            List <User> result   = tester.getUserByID(3);
            string      a        = result.FirstOrDefault().Password;

            Assert.AreEqual(expected, a, "Seharusnya sama");
        }