コード例 #1
0
        public void TestSelectAllItem()
        {
            MockUser tester = new MockUser();

            tester.createMockUser();
            List <User> result   = tester.getAllUserTest();
            int         expected = 3;
            int         a        = result.Count;

            Assert.AreEqual(expected, a, "Seharusnya 3");
        }
コード例 #2
0
        public void TestDeleteUserbyId()
        {
            MockUser tester = new MockUser();

            tester.createMockUser();
            tester.deleteUserById(3);
            int         expected = 2;
            List <User> result   = tester.getAllUserTest();
            int         a        = result.Count;

            Assert.AreEqual(expected, a, "Seharusnya 2");
        }
コード例 #3
0
        public void TestAddNewUser()
        {
            MockUser tester = new MockUser();

            tester.createMockUser();
            tester.addNewUser("adi", "*****@*****.**", "12345");
            int         expected = 4;
            List <User> result   = tester.getAllUserTest();
            int         a        = result.Count;

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