本文整理汇总了Java中us.fatehi.creditcardnumber.AccountNumber.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java AccountNumber.dispose方法的具体用法?Java AccountNumber.dispose怎么用?Java AccountNumber.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类us.fatehi.creditcardnumber.AccountNumber
的用法示例。
在下文中一共展示了AccountNumber.dispose方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pan_1
import us.fatehi.creditcardnumber.AccountNumber; //导入方法依赖的package包/类
@Test
public void pan_1()
{
final String rawAccountNumber = "5266092201416173";
final AccountNumber pan = new AccountNumber(rawAccountNumber);
assertTrue("Should not pass Luhn check", !pan.passesLuhnCheck());
assertEquals(CardBrand.MasterCard, pan.getCardBrand());
assertEquals(MajorIndustryIdentifier.mii_5,
pan.getMajorIndustryIdentifier());
assertTrue(pan.hasRawData());
assertTrue(pan.hasAccountNumber());
assertTrue(pan.hasLastFourDigits());
assertTrue(pan.hasIssuerIdentificationNumber());
assertEquals("5266092201416173", pan.getAccountNumber());
assertEquals("6173", pan.getLastFourDigits());
assertEquals("526609", pan.getIssuerIdentificationNumber());
pan.dispose();
assertTrue(!pan.hasRawData());
assertTrue(!pan.hasAccountNumber());
assertTrue(!pan.hasLastFourDigits());
assertTrue(!pan.hasIssuerIdentificationNumber());
assertEquals(null, pan.getAccountNumber());
assertEquals(null, pan.getLastFourDigits());
assertEquals(null, pan.getIssuerIdentificationNumber());
}
示例2: pan_2
import us.fatehi.creditcardnumber.AccountNumber; //导入方法依赖的package包/类
@Test
public void pan_2()
{
final String rawAccountNumber = "573";
final AccountNumber pan = new AccountNumber(rawAccountNumber);
assertTrue("Should not pass Luhn check", !pan.passesLuhnCheck());
assertEquals(CardBrand.Unknown, pan.getCardBrand());
assertEquals(MajorIndustryIdentifier.mii_5,
pan.getMajorIndustryIdentifier());
assertTrue(pan.hasRawData());
assertTrue(pan.hasAccountNumber());
assertTrue(pan.hasLastFourDigits());
assertTrue(pan.hasIssuerIdentificationNumber());
assertEquals("573", pan.getAccountNumber());
assertEquals("0573", pan.getLastFourDigits());
assertEquals("573000", pan.getIssuerIdentificationNumber());
pan.dispose();
assertTrue(!pan.hasRawData());
assertTrue(!pan.hasAccountNumber());
assertTrue(!pan.hasLastFourDigits());
assertTrue(!pan.hasIssuerIdentificationNumber());
assertEquals(null, pan.getAccountNumber());
assertEquals(null, pan.getLastFourDigits());
assertEquals(null, pan.getIssuerIdentificationNumber());
}
示例3: pan_a
import us.fatehi.creditcardnumber.AccountNumber; //导入方法依赖的package包/类
@Test
public void pan_a()
{
final String rawAccountNumber = null;
final AccountNumber pan = new AccountNumber(rawAccountNumber);
assertTrue(!pan.hasAccountNumber());
pan.dispose();
assertTrue(!pan.hasAccountNumber());
}
示例4: pan_b
import us.fatehi.creditcardnumber.AccountNumber; //导入方法依赖的package包/类
@Test
public void pan_b()
{
final String rawAccountNumber = "\t\t";
final AccountNumber pan = new AccountNumber(rawAccountNumber);
assertTrue(!pan.hasAccountNumber());
pan.dispose();
assertTrue(!pan.hasAccountNumber());
}
示例5: main
import us.fatehi.creditcardnumber.AccountNumber; //导入方法依赖的package包/类
public static void main(final String[] args)
{
final AccountNumber pan = new AccountNumber("5266-0922-0141-6174");
pan.dispose();
System.out.println(pan);
}