Assert.assertEquals( targetResource.getId(), repositoryTarget.getId() ); Assert.assertEquals( targetResource.getContentClass(), repositoryTarget.getContentClass() ); Assert.assertEquals( targetResource.getName(), repositoryTarget.getName() );
Assert.assertEquals( targetResource.getId(), repositoryTarget.getId() ); Assert.assertEquals( targetResource.getContentClass(), repositoryTarget.getContentClass() ); Assert.assertEquals( targetResource.getName(), repositoryTarget.getName() ); Assert.assertEquals( targetResource.getPatterns(), repositoryTarget.getPatterns() );
protected Target convert( CRepositoryTarget target ) { ContentClass contentClass = getContentClassById( target.getContentClass() ); // If content class is null, we have a target for a repo type that no longer exists // plugin was removed most likely, so we ignore in this case if ( contentClass != null ) { return new Target( target.getId(), target.getName(), contentClass, target.getPatterns() ); } return null; }
public void verifyCompleteTargetsConfig(List<RepositoryTargetListResource> targets) throws IOException { // check the nexus.xml Configuration config = getTest().getNexusConfigUtil().getNexusConfig(); List<CRepositoryTarget> repoTargets = config.getRepositoryTargets(); // check to see if the size matches Assert.assertTrue("Configuration had a different number: (" + repoTargets.size() + ") of targets then expected: (" + targets.size() + ")", repoTargets.size() == targets.size()); // look for the target by id for (Iterator<RepositoryTargetListResource> iter = targets.iterator(); iter.hasNext(); ) { RepositoryTargetListResource targetResource = iter.next(); boolean found = false; for (Iterator<CRepositoryTarget> iterInner = repoTargets.iterator(); iterInner.hasNext(); ) { CRepositoryTarget repositoryTarget = iterInner.next(); if (targetResource.getId().equals(repositoryTarget.getId())) { found = true; Assert.assertEquals(repositoryTarget.getId(), targetResource.getId()); Assert.assertEquals(repositoryTarget.getContentClass(), targetResource.getContentClass()); Assert.assertEquals(repositoryTarget.getName(), targetResource.getName()); break; } } if (!found) { Assert.fail("Target with ID: " + targetResource.getId() + " could not be found in configuration."); } } }
Assert.assertEquals(repositoryTarget.getId(), targetResource.getId()); Assert.assertEquals(repositoryTarget.getContentClass(), targetResource.getContentClass()); Assert.assertEquals(repositoryTarget.getName(), targetResource.getName());
if ( StringUtils.isEmpty( settings.getName() ) )