當前位置: 首頁>>代碼示例>>Java>>正文


Java ServiceCode1類代碼示例

本文整理匯總了Java中us.fatehi.creditcardnumber.ServiceCode1的典型用法代碼示例。如果您正苦於以下問題:Java ServiceCode1類的具體用法?Java ServiceCode1怎麽用?Java ServiceCode1使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ServiceCode1類屬於us.fatehi.creditcardnumber包,在下文中一共展示了ServiceCode1類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkCardData

import us.fatehi.creditcardnumber.ServiceCode1; //導入依賴的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.ServiceCode1; //導入依賴的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.ServiceCode1; //導入依賴的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.ServiceCode1; //導入依賴的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.ServiceCode1; //導入依賴的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.ServiceCode1; //導入依賴的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.ServiceCode1; //導入依賴的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.ServiceCode1類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。