Java单元测试
Assert.assertNotNull(airport);
Assert.assertEquals("US", airport.getCity().getCountry().getCountryCode());
Assert.assertNull(airport);
@Test
public void testFindByCouponCode() {
Coupon coupon = couponDao.findByCouponCode("TTTFM47ZV");
Assert.assertNotNull(coupon);
Assert.assertEquals(Integer.valueOf(157), coupon.getCouponPolicyId());
Assert.assertEquals("e7b460dab44611e5b9273417ebd60935", coupon.getConsumer());
Assert.assertEquals("hzc", coupon.getDistributionChannel());
Assert.assertEquals("American promotion", coupon.getPromotionFrom());
Assert.assertEquals(Integer.valueOf(1), coupon.getPlatform());
}
@Test
public void testGetInstance() {
CouponMode couponMode = CouponMode.getInstance(1);
Assert.assertEquals(CouponMode.PRIVATE, couponMode);
}
小蚊子大人