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