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


Java ServiceCode2类代码示例

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


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

示例1: checkCardData

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
private void checkCardData(final Track1FormatB track1FormatB)
{
  assertEquals("%B5266092201416174^FATEHI/SUALEH^16042010000000000000000000000000000567001000?",
               track1FormatB.getRawData());
  assertEquals("B", track1FormatB.getFormatCode());
  assertEquals("5266092201416174",
               track1FormatB.getAccountNumber().getAccountNumber());
  assertEquals(CardBrand.MasterCard,
               track1FormatB.getAccountNumber().getCardBrand());
  assertEquals(MajorIndustryIdentifier.mii_5,
               track1FormatB.getAccountNumber().getMajorIndustryIdentifier());
  assertEquals("Sualeh Fatehi", track1FormatB.getName().toString());
  assertEquals("Sualeh", track1FormatB.getName().getFirstName());
  assertEquals("Fatehi", track1FormatB.getName().getLastName());
  assertEquals("2016-04", track1FormatB.getExpirationDate().toString());
  assertEquals("201", track1FormatB.getServiceCode().toString());
  assertEquals(ServiceCode1.v_2,
               track1FormatB.getServiceCode().getServiceCode1());
  assertEquals(ServiceCode2.v_0,
               track1FormatB.getServiceCode().getServiceCode2());
  assertEquals(ServiceCode3.v_1,
               track1FormatB.getServiceCode().getServiceCode3());
  assertEquals("0000000000000000000000000000567001000",
               track1FormatB.getDiscretionaryData());
}
 
开发者ID:IDPay,项目名称:magnetic-track-parser,代码行数:26,代码来源:Track1FormatBTest.java

示例2: checkCardData

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
private void checkCardData(final Track1FormatB track1FormatB)
{
  assertEquals("B5266092201416174^FATEHI/SUALEH^16042010000000000000000000000000000567001000",
               track1FormatB.getRawData());
  assertEquals("B", track1FormatB.getFormatCode());
  assertEquals("5266092201416174",
               track1FormatB.getAccountNumber().getAccountNumber());
  assertEquals(CardBrand.MasterCard,
               track1FormatB.getAccountNumber().getCardBrand());
  assertEquals(MajorIndustryIdentifier.mii_5,
               track1FormatB.getAccountNumber().getMajorIndustryIdentifier());
  assertEquals("Sualeh Fatehi", track1FormatB.getName().toString());
  assertEquals("Sualeh", track1FormatB.getName().getFirstName());
  assertEquals("Fatehi", track1FormatB.getName().getLastName());
  assertEquals("2016-04", track1FormatB.getExpirationDate().toString());
  assertEquals("201", track1FormatB.getServiceCode().toString());
  assertEquals(ServiceCode1.v_2,
               track1FormatB.getServiceCode().getServiceCode1());
  assertEquals(ServiceCode2.v_0,
               track1FormatB.getServiceCode().getServiceCode2());
  assertEquals(ServiceCode3.v_1,
               track1FormatB.getServiceCode().getServiceCode3());
  assertEquals("0000000000000000000000000000567001000",
               track1FormatB.getDiscretionaryData());
}
 
开发者ID:IDPay,项目名称:magnetic-track-parser,代码行数:26,代码来源:Track1FormatBNoSentinelTest.java

示例3: checkCardData

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
private void checkCardData(final Track2 track2)
{
  assertEquals(";5266092201416174=16042010000056700100?",
               track2.getRawData());
  assertEquals("5266092201416174",
               track2.getAccountNumber().getAccountNumber());
  assertEquals(CardBrand.MasterCard,
               track2.getAccountNumber().getCardBrand());
  assertEquals(MajorIndustryIdentifier.mii_5,
               track2.getAccountNumber().getMajorIndustryIdentifier());
  assertEquals("2016-04", track2.getExpirationDate().toString());
  assertEquals("201", track2.getServiceCode().toString());
  assertEquals(ServiceCode1.v_2, track2.getServiceCode().getServiceCode1());
  assertEquals(ServiceCode2.v_0, track2.getServiceCode().getServiceCode2());
  assertEquals(ServiceCode3.v_1, track2.getServiceCode().getServiceCode3());
  assertEquals("0000056700100", track2.getDiscretionaryData());
}
 
开发者ID:IDPay,项目名称:magnetic-track-parser,代码行数:18,代码来源:Track2Test.java

示例4: serviceCode_4

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
@Test
public void serviceCode_4()
{
  final String rawServiceCode = "10";
  final ServiceCode serviceCode = new ServiceCode(rawServiceCode);
  assertEquals(rawServiceCode, serviceCode.getRawData());
  assertEquals(ServiceCode1.v_1, serviceCode.getServiceCode1());
  assertEquals(ServiceCode2.v_0, serviceCode.getServiceCode2());
  assertTrue("Should not have service code", !serviceCode.hasServiceCode());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:11,代码来源:ServiceCodeTest.java

示例5: serviceCode1

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
@Test
public void serviceCode1()
{
  final String rawServiceCode = "101";
  final ServiceCode serviceCode = new ServiceCode(rawServiceCode);
  assertEquals(rawServiceCode, serviceCode.getRawData());
  assertTrue("Should have service code", serviceCode.hasServiceCode());
  assertEquals(ServiceCode1.v_1, serviceCode.getServiceCode1());
  assertEquals(ServiceCode2.v_0, serviceCode.getServiceCode2());
  assertEquals(ServiceCode3.v_1, serviceCode.getServiceCode3());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:12,代码来源:ServiceCodeTest.java

示例6: serviceCode2

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
@Test
public void serviceCode2()
{
  final String rawServiceCode = "222 ";
  final ServiceCode serviceCode = new ServiceCode(rawServiceCode);
  assertEquals(rawServiceCode, serviceCode.getRawData());
  assertTrue("Should have service code", serviceCode.hasServiceCode());
  assertEquals(ServiceCode1.v_2, serviceCode.getServiceCode1());
  assertEquals(ServiceCode2.v_2, serviceCode.getServiceCode2());
  assertEquals(ServiceCode3.v_2, serviceCode.getServiceCode3());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:12,代码来源:ServiceCodeTest.java

示例7: serviceCode3

import us.fatehi.creditcardnumber.ServiceCode2; //导入依赖的package包/类
@Test
public void serviceCode3()
{
  final String rawServiceCode = "52525";
  final ServiceCode serviceCode = new ServiceCode(rawServiceCode);
  assertEquals(rawServiceCode, serviceCode.getRawData());
  assertTrue("Should have service code", serviceCode.hasServiceCode());
  assertEquals(ServiceCode1.v_5, serviceCode.getServiceCode1());
  assertEquals(ServiceCode2.v_2, serviceCode.getServiceCode2());
  assertEquals(ServiceCode3.v_5, serviceCode.getServiceCode3());
}
 
开发者ID:sualeh,项目名称:credit_card_number,代码行数:12,代码来源:ServiceCodeTest.java


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