@Test public void addCoinsForUserTestCase002() throws Exception { // coins = null coinsTxnService.addCoinsForUser(11L, null); int coins = coinsTxnService.getCoinsByUserId(11L); Assert.assertEquals(10, coins); }
@Test public void getCoinsByUserIdTestCase001() throws Exception { // 此用户不存在 coinsTxnService.addCoinsForUser(10L, 10); Integer coins = coinsTxnService.getCoinsByUserId(15L); Assert.assertEquals(null, coins); }
@Test public void addCoinsForUserTestCase001() throws Exception { // 正常case coinsTxnService.addCoinsForUser(1000L, 10); int coins = coinsTxnService.getCoinsByUserId(1000L); Assert.assertEquals(10, coins); }