本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}