Package org.nfctools.mf.classic

Examples of org.nfctools.mf.classic.MfClassicReaderWriter


  }

  @Test
  public void testMadDeleteApplication() throws Exception {
    MfClassicReaderWriter readerWriter = loadData(cardWithMad);

    ApplicationDirectory applicationDirectory = readerWriter.getApplicationDirectory(MAD_KEY_CONFIG);
    applicationDirectory.deleteApplication(testAppId, dummyKey, testNdefTrailerBlock);

    assertEquals(maxFreeSpace, applicationDirectory.getMaxContinousSize());
  }
View Full Code Here


    assertEquals(maxFreeSpace, applicationDirectory.getMaxContinousSize());
  }

  @Test
  public void testMadAllocateSpecifiedMemory() throws Exception {
    MfClassicReaderWriter readerWriter = loadData(blankCard);

    ApplicationDirectory applicationDirectory = readerWriter.createApplicationDirectory(MAD_KEY_CONFIG);
    Application application = applicationDirectory.createApplication(testAppId, 50, dummyKey, testNdefTrailerBlock);
    assertEquals(96, application.getAllocatedSize());
    assertEquals(maxFreeSpace - 96, applicationDirectory.getMaxContinousSize());
  }
View Full Code Here

    assertEquals(15 * 16, mad2.getSlotSize(37));
  }

  @Test
  public void testMadAidSize() throws Exception {
    MfClassicReaderWriter readerWriter = loadData(blankCard);
    ApplicationDirectory applicationDirectory = readerWriter.createApplicationDirectory(MAD_KEY_CONFIG);

    assertEquals(2, applicationDirectory.getVersion());

    assertTrue(applicationDirectory.isFree(0));
    assertTrue(applicationDirectory.isFree(applicationDirectory.getNumberOfSlots() - 1));
View Full Code Here

TOP

Related Classes of org.nfctools.mf.classic.MfClassicReaderWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.