Package org.sonatype.nexus.test.utils

Examples of org.sonatype.nexus.test.utils.GroupMessageUtil


  @Test
  public void createGroupWithRepoAndDelete()
      throws Exception
  {
    GroupMessageUtil groupUtil = new GroupMessageUtil(getXMLXStream(), MediaType.APPLICATION_XML);

    RepositoryGroupResource resource = new RepositoryGroupResource();
    resource.setExposed(true);
    resource.setFormat("maven2");
    resource.setId("nonemptygroup");
    resource.setName("nonemptygroup");
    resource.setProvider("maven2");

    RepositoryGroupMemberRepository member = new RepositoryGroupMemberRepository();
    member.setId(REPO_TEST_HARNESS_REPO);
    resource.addRepository(member);

    resource = groupUtil.createGroup(resource);

    resource.getRepositories().clear();

    resource = groupUtil.updateGroup(resource);

    Assert.assertEquals(0, resource.getRepositories().size());
  }
View Full Code Here


{

  protected GroupMessageUtil messageUtil;

  public Nexus532GroupsCrudValidationIT() {
    this.messageUtil = new GroupMessageUtil(this.getXMLXStream(), MediaType.APPLICATION_XML);
  }
View Full Code Here

{

  protected GroupMessageUtil messageUtil;

  public Nexus532GroupsCrudXmlIT() {
    this.messageUtil = new GroupMessageUtil(this.getXMLXStream(), MediaType.APPLICATION_XML);
  }
View Full Code Here

    public void download()
        throws Exception
    {
        RepositoryMessageUtil repoUtil =
            new RepositoryMessageUtil( this, XStreamFactory.getXmlXStream(), MediaType.APPLICATION_XML );
        GroupMessageUtil groupUtil =
            new GroupMessageUtil( this, XStreamFactory.getXmlXStream(), MediaType.APPLICATION_XML );

        RepositoryBaseResource flexmojos = repoUtil.getRepository( "flexmojos" );
        assertNotNull( flexmojos );

        RepositoryGroupResource publicGroup = groupUtil.getGroup( "public" );
        assertNotNull( publicGroup );
        Matcher<?> matcher =
            hasItem( having( on( RepositoryGroupMemberRepository.class ).getId(), equalTo( flexmojos.getId() ) ) );
        assertThat( publicGroup.getRepositories(), (Matcher<Iterable<RepositoryGroupMemberRepository>>) matcher );
    }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.test.utils.GroupMessageUtil

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.