本文整理匯總了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);
}