Java AccountNumber类代码示例

本文整理汇总了Java中us.fatehi.creditcardnumber.AccountNumber的典型用法代码示例。如果您正苦于以下问题:Java AccountNumber类的具体用法?Java AccountNumber怎么用?Java AccountNumber使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Java AccountNumber类代码示例

AccountNumber类属于us.fatehi.creditcardnumber包,在下文中一共展示了AccountNumber类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: iin_1

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void iin_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("6173", pan.getLastFourDigits());
  assertEquals("526609", pan.getIssuerIdentificationNumber());

  pan.disposeIssuerIdentificationNumber();

  assertTrue(!pan.hasRawData());
  assertTrue(!pan.hasAccountNumber());
  assertTrue(pan.hasLastFourDigits());
  assertTrue(!pan.hasIssuerIdentificationNumber());
  assertEquals("6173", pan.getLastFourDigits());
  assertEquals(null, pan.getIssuerIdentificationNumber());
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:27,代码来源:SecureAccountNumberTest.java

示例2: iin_2

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void iin_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("0573", pan.getLastFourDigits());
  assertEquals("573000", pan.getIssuerIdentificationNumber());

  pan.disposeIssuerIdentificationNumber();

  assertTrue(!pan.hasRawData());
  assertTrue(!pan.hasAccountNumber());
  assertTrue(pan.hasLastFourDigits());
  assertTrue(!pan.hasIssuerIdentificationNumber());
  assertEquals("0573", pan.getLastFourDigits());
  assertEquals(null, pan.getIssuerIdentificationNumber());
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:27,代码来源:SecureAccountNumberTest.java

示例3: lastFourDigits_1

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void lastFourDigits_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("6173", pan.getLastFourDigits());
  assertEquals("526609", pan.getIssuerIdentificationNumber());

  pan.disposeLastFourDigits();

  assertTrue(!pan.hasRawData());
  assertTrue(!pan.hasAccountNumber());
  assertTrue(!pan.hasLastFourDigits());
  assertTrue(pan.hasIssuerIdentificationNumber());
  assertEquals(null, pan.getLastFourDigits());
  assertEquals("526609", pan.getIssuerIdentificationNumber());
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:27,代码来源:SecureAccountNumberTest.java

示例4: lastFourDigits_2

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void lastFourDigits_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("0573", pan.getLastFourDigits());
  assertEquals("573000", pan.getIssuerIdentificationNumber());

  pan.disposeLastFourDigits();

  assertTrue(!pan.hasRawData());
  assertTrue(!pan.hasAccountNumber());
  assertTrue(!pan.hasLastFourDigits());
  assertTrue(pan.hasIssuerIdentificationNumber());
  assertEquals(null, pan.getLastFourDigits());
  assertEquals("573000", pan.getIssuerIdentificationNumber());
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:27,代码来源:SecureAccountNumberTest.java

示例5: Track2

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
private Track2(final String rawTrackData,
               final AccountNumber pan,
               final ExpirationDate expirationDate,
               final ServiceCode serviceCode,
               final String discretionaryData)
{
  super(rawTrackData, pan, expirationDate, serviceCode, discretionaryData);
} 
开发者ID:IDPay,项目名称:magnetic-track-parser,代码行数:9,代码来源:Track2.java

示例6: Track1FormatB

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
private Track1FormatB(final String rawTrackData,
                      final AccountNumber pan,
                      final ExpirationDate expirationDate,
                      final Name name,
                      final ServiceCode serviceCode,
                      final String formatCode,
                      final String discretionaryData)
{
  super(rawTrackData, pan, expirationDate, serviceCode, discretionaryData);
  this.formatCode = formatCode;
  this.name = name;
} 
开发者ID:IDPay,项目名称:magnetic-track-parser,代码行数:13,代码来源:Track1FormatB.java

示例7: BaseBankCardTrackData

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
BaseBankCardTrackData(final String rawTrackData,
                      final AccountNumber pan,
                      final ExpirationDate expirationDate,
                      final ServiceCode serviceCode,
                      final String discretionaryData)
{
  super(rawTrackData, discretionaryData);
  this.pan = pan;
  this.expirationDate = expirationDate;
  this.serviceCode = serviceCode;
} 
开发者ID:IDPay,项目名称:magnetic-track-parser,代码行数:12,代码来源:BaseBankCardTrackData.java

示例8: main

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
public static void main(final String[] args)
{
  final AccountNumber pan = new AccountNumber("5266-0922-0141-6174");
  final ExpirationDate expiration = new ExpirationDate(2015, 4);
  final Name name = new Name("Sualeh", "Fatehi");
  final BankCard card = new BankCard(pan, expiration, name);
  System.out.println(card);
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:9,代码来源:SampleCode1.java

示例9: pan_1

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan_1()
{
  final String rawAccountNumber = null;
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertEquals(rawAccountNumber, pan.getRawData());
  assertTrue(!pan.hasAccountNumber());
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:9,代码来源:PrimaryAccountNumberTest.java

示例10: pan_2

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan_2()
{
  final String rawAccountNumber = "\t\t";
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertEquals(rawAccountNumber, pan.getRawData());
  assertTrue(!pan.hasAccountNumber());
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:9,代码来源:PrimaryAccountNumberTest.java

示例11: pan_3

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan_3()
{
  final String rawAccountNumber = "5266092201416173";
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertEquals(rawAccountNumber, pan.getRawData());
  assertTrue("Should not pass Luhn check", !pan.passesLuhnCheck());
  check(rawAccountNumber, pan, rawAccountNumber);
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:10,代码来源:PrimaryAccountNumberTest.java

示例12: pan1

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan1()
{
  final String rawAccountNumber = "5266092201416174";
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertTrue("Does not pass Luhn check", pan.passesLuhnCheck());
  check(rawAccountNumber, pan, rawAccountNumber);
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:9,代码来源:PrimaryAccountNumberTest.java

示例13: pan2

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan2()
{
  final String rawAccountNumber = "  5266-0922-0141-6174  ";
  final String accountNumber = "5266092201416174";
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertTrue("Does not pass Luhn check", pan.passesLuhnCheck());
  check(rawAccountNumber, pan, accountNumber);
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:10,代码来源:PrimaryAccountNumberTest.java

示例14: pan3

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan3()
{
  final String rawAccountNumber = "  5266-0922-0141-6174-7889  ";
  final String accountNumber = "52660922014161747889";
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertTrue("Should not pass Luhn check", !pan.passesLuhnCheck());
  assertTrue("Should not pass Luhn check", pan.exceedsMaximumLength());
  check(rawAccountNumber, pan, accountNumber);
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:11,代码来源:PrimaryAccountNumberTest.java

示例15: pan4

import us.fatehi.creditcardnumber.AccountNumber; //导入依赖的package包/类
@Test
public void pan4()
{
  final String rawAccountNumber = "  5266-0922  ";
  final String accountNumber = "52660922";
  final AccountNumber pan = new AccountNumber(rawAccountNumber);
  assertTrue("Should not pass Luhn check", !pan.passesLuhnCheck());
  check(rawAccountNumber, pan, accountNumber);
} 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:10,代码来源:PrimaryAccountNumberTest.java

本文标签属性:

示例:示例的拼音

代码:代码生成器

java:java面试题

AccountNumber:balance

上一篇:花西子送1万根眉笔(花西子送1万根眉笔是真的吗)(花西子送1万根眉笔涨价了吗?)
下一篇:Java AbsoluteLayout类代码示例

为您推荐