当前位置: 首页>>代码示例>>Java>>正文


Java AccountNumber.dispose方法代码示例

本文整理汇总了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());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:29,代码来源:SecureAccountNumberTest.java

示例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());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:29,代码来源:SecureAccountNumberTest.java

示例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());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:10,代码来源:SecureAccountNumberTest.java

示例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());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:10,代码来源:SecureAccountNumberTest.java

示例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);
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:7,代码来源:SampleCode2.java


注:本文中的us.fatehi.creditcardnumber.AccountNumber.dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。