Examples of NFCResourceResponse


Examples of org.sonatype.nexus.rest.model.NFCResourceResponse

        NFCRepositoryResource repoNfc = createNFCRepositoryResource(repository);

        resource.addNfcContent(repoNfc);
      }

      NFCResourceResponse result = new NFCResourceResponse();

      result.setData(resource);

      return result;
    }
    catch (NoSuchRepositoryException e) {
      throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage());
View Full Code Here

Examples of org.sonatype.nexus.rest.model.NFCResourceResponse

    this.validateXmlHasNoPackageNames(response);
  }

  @Test
  public void testNFCResourceResponse() {
    NFCResourceResponse resourceResponse = new NFCResourceResponse();

    NFCRepositoryResource nfcRepoResource1 = new NFCRepositoryResource();
    nfcRepoResource1.setRepositoryId("repoId1");
    nfcRepoResource1.addNfcPath("path1");
    nfcRepoResource1.addNfcPath("path2");

    NFCStats stats = new NFCStats();
    stats.setHits(1000);
    stats.setMisses(5000);
    stats.setSize(44);
    nfcRepoResource1.setNfcStats(stats);

    NFCRepositoryResource nfcRepoResource2 = new NFCRepositoryResource();
    nfcRepoResource2.setRepositoryId("repoId2");
    nfcRepoResource2.addNfcPath("path3");
    nfcRepoResource2.addNfcPath("path4");

    NFCStats stats2 = new NFCStats();
    stats2.setHits(1000);
    stats2.setMisses(5000);
    stats2.setSize(44);
    nfcRepoResource2.setNfcStats(stats2);

    NFCResource resource = new NFCResource();
    resource.addNfcContent(nfcRepoResource1);
    resource.addNfcContent(nfcRepoResource2);

    resourceResponse.setData(resource);

    // Excluded because our damn json reader doesn't support parsing long values...very very bad
    // this.marshalUnmarchalThenCompare( resourceResponse );
    // TODO: UNCOMMENT this when the json driver is fixed.
    this.validateXmlHasNoPackageNames(resourceResponse);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.