@Test public void definirReleaseHomologadaComDeployEmAmbienteDeHomologacao() { Release release = new Release(); release.adicionarDeployHomologacao(); release.setHomologada(true); Assert.assertTrue(release.isHomologada()); }
@Test public void definirReleaseTestadaComDeployEmAmbienteDeTeste() { Release release = new Release(); release.adicionarDeployTeste(); release.setTestada(true); Assert.assertTrue(release.isTestada()); }
/** * RtReleases can remove a release. * * @throws Exception if any problem inside */ @Test public void canRemoveRelease() throws Exception { final Releases releases = repo.releases(); final Release release = releases.create(RandomStringUtils.randomAlphanumeric(Tv.TEN)); MatcherAssert.assertThat(releases.iterate(), Matchers.hasItem(release)); releases.remove(release.number()); MatcherAssert.assertThat(releases.iterate(), Matchers.not(Matchers.hasItem(release))); }
@Test public void verificarSituacaoReleaseDeployEmTeste() { Release release = new Release(); release.adicionarDeployTeste(); release.adicionarDeployProducao(); Assert.assertEquals(SituacaoRelease.PRODUCAO_DEPLOY_TESTE, release.getSituacao()); }
@Test public void verificarSituacaoReleaseDeployEmHomologacao() { Release release = new Release(); release.adicionarDeployHomologacao(); release.adicionarDeployProducao(); Assert.assertEquals(SituacaoRelease.PRODUCAO_DEPLOY_HOMOLOGACAO, release.getSituacao()); }
@Test public void verificarSituacaoReleaseDeploySomenteEmProducao() { Release release = new Release(); release.adicionarDeployProducao(); Assert.assertEquals( SituacaoRelease.PRODUCAO_SEM_DEPLOY_HOMOLOGACAO_TESTE, release.getSituacao()); }
@Override protected void getRelationTarget(RelationWs2 rel, IncludesWs2 inc) throws MBWS2Exception { super.getRelationTarget(rel, inc); /* Ws2 don't allow Artist Credits requests for areas * at the moment,so we have to complete the relations. * with target derived informations. * * Time consuming, but no other way. To avoid it, set * getIncludes().setArtistCredits(false) when asking for * relations. */ if (!getIncludes().isArtistCredits()) return; if (inc.isRecordingRelations() && rel.getTargetType().equals(RelationWs2.TO_RECORDING)) { RecordingWs2 recWs2 = (RecordingWs2) rel.getTarget(); if (recWs2.getArtistCredit() != null) return; Recording rec = new Recording(); rec.setQueryWs(getQueryWs()); rec.getIncludes().excludeAll(); rec.getIncludes().setArtistCredits(true); recWs2 = rec.lookUp(recWs2); rel.setTarget(recWs2); } else if (inc.isReleaseRelations() && rel.getTargetType().equals(RelationWs2.TO_RELEASE)) { ReleaseWs2 relWs2 = (ReleaseWs2) rel.getTarget(); if (relWs2.getArtistCredit() != null) return; Release rls = new Release(); rls.setQueryWs(getQueryWs()); rls.getIncludes().excludeAll(); rls.getIncludes().setArtistCredits(true); } else if (inc.isReleaseGroupRelations() && rel.getTargetType().equals(RelationWs2.TO_RELEASE_GROUP)) { ReleaseGroupWs2 relWs2 = (ReleaseGroupWs2) rel.getTarget(); if (relWs2.getArtistCredit() != null) return; ReleaseGroup rg = new ReleaseGroup(); rg.setQueryWs(getQueryWs()); rg.getIncludes().excludeAll(); rg.getIncludes().setArtistCredits(true); } }
public final Set<scrum.server.project.Project> getProjects() { if (projectsCache == null) { projectsCache = new HashSet<scrum.server.project.Project>(); for (Release e : getEntities()) { if (e.isProjectSet()) projectsCache.add(e.getProject()); } } return projectsCache; }
public final Set<scrum.server.sprint.Sprint> getSprints() { if (sprintsCache == null) { sprintsCache = new HashSet<scrum.server.sprint.Sprint>(); for (Release e : getEntities()) { sprintsCache.addAll(e.getSprints()); } } return sprintsCache; }
public final Set<java.lang.String> getNotes() { if (notesCache == null) { notesCache = new HashSet<java.lang.String>(); for (Release e : getEntities()) { if (e.isNoteSet()) notesCache.add(e.getNote()); } } return notesCache; }
public final Set<Integer> getNumbers() { if (numbersCache == null) { numbersCache = new HashSet<Integer>(); for (Release e : getEntities()) { numbersCache.add(e.getNumber()); } } return numbersCache; }
public final Set<java.lang.String> getReleaseNotess() { if (releaseNotessCache == null) { releaseNotessCache = new HashSet<java.lang.String>(); for (Release e : getEntities()) { if (e.isReleaseNotesSet()) releaseNotessCache.add(e.getReleaseNotes()); } } return releaseNotessCache; }
public final Set<scrum.server.release.Release> getParentReleases() { if (parentReleasesCache == null) { parentReleasesCache = new HashSet<scrum.server.release.Release>(); for (Release e : getEntities()) { if (e.isParentReleaseSet()) parentReleasesCache.add(e.getParentRelease()); } } return parentReleasesCache; }
public final Set<java.lang.String> getScriptOutputs() { if (scriptOutputsCache == null) { scriptOutputsCache = new HashSet<java.lang.String>(); for (Release e : getEntities()) { if (e.isScriptOutputSet()) scriptOutputsCache.add(e.getScriptOutput()); } } return scriptOutputsCache; }
public final Set<ilarkesto.base.time.Date> getReleaseDates() { if (releaseDatesCache == null) { releaseDatesCache = new HashSet<ilarkesto.base.time.Date>(); for (Release e : getEntities()) { if (e.isReleaseDateSet()) releaseDatesCache.add(e.getReleaseDate()); } } return releaseDatesCache; }
public final Set<java.lang.String> getLabels() { if (labelsCache == null) { labelsCache = new HashSet<java.lang.String>(); for (Release e : getEntities()) { if (e.isLabelSet()) labelsCache.add(e.getLabel()); } } return labelsCache; }
/** * RtReleases can edit release body. * * @throws Exception if any problem inside. */ @Test public void canEditBody() throws Exception { final Releases releases = repo.releases(); final Release release = releases.create(RandomStringUtils.randomAlphanumeric(Tv.TEN)); final String body = "Description of the release"; new Release.Smart(release).body(body); MatcherAssert.assertThat( new Release.Smart(releases.get(release.number())).body(), Matchers.equalTo(body)); releases.remove(release.number()); }
@Test public void verificarSituacaoReleaseTestada() { Release release = new Release(); release.adicionarDeployTeste(); release.adicionarDeployProducao(); release.setTestada(true); Assert.assertEquals(SituacaoRelease.PRODUCAO_TESTADA, release.getSituacao()); }
/** * RtReleases can edit release tag. * * @throws Exception if any problem inside. */ @Test public void canEditTag() throws Exception { final Releases releases = repo.releases(); final Release release = releases.create(RandomStringUtils.randomAlphanumeric(Tv.TEN)); final String tag = RandomStringUtils.randomAlphanumeric(Tv.FIFTEEN); new Release.Smart(release).tag(tag); MatcherAssert.assertThat( new Release.Smart(releases.get(release.number())).tag(), Matchers.equalTo(tag)); releases.remove(release.number()); }
/** * RtReleases can fetch a single release. * * @throws Exception if any error inside */ @Test public void canFetchRelease() throws Exception { final Releases releases = repo.releases(); final String tag = "v1.0"; final Release release = releases.create(tag); MatcherAssert.assertThat( releases.get(release.number()).number(), Matchers.equalTo(release.number())); MatcherAssert.assertThat( new Release.Smart(releases.get(release.number())).tag(), Matchers.equalTo(tag)); releases.remove(release.number()); }
@Test public void verificarSituacaoReleaseHomologada() { Release release = new Release(); release.adicionarDeployHomologacao(); ; release.adicionarDeployProducao(); release.setHomologada(true); Assert.assertEquals(SituacaoRelease.PRODUCAO_HOMOLOGADA, release.getSituacao()); }
/** * RtReleases can iterate releases. * * @throws Exception if something goes wrong */ @Test public void canFetchAllReleases() throws Exception { final Releases releases = repo.releases(); final Release release = releases.create(RandomStringUtils.randomAlphanumeric(Tv.TEN)); try { MatcherAssert.assertThat( releases.iterate(), Matchers.not(Matchers.emptyIterableOf(Release.class))); } finally { releases.remove(release.number()); } }
/** * RtReleases can create a release. * * @throws Exception if any error inside */ @Test public void canCreateRelease() throws Exception { final Releases releases = repo.releases(); final Release created = releases.create("0.1"); final int number = created.number(); try { final Release obtained = releases.get(number); MatcherAssert.assertThat(created, Matchers.is(obtained)); MatcherAssert.assertThat( new Release.Smart(created).tag(), Matchers.equalTo(new Release.Smart(obtained).tag())); } finally { releases.remove(number); } }
@Override public AddDocumentRequestSummary addRelease(Release release, User user) throws TException { assertNotNull(release); assertIdUnset(release.getId()); assertUser(user); return handler.addRelease(release, user.getEmail()); }
@Override public RequestStatus updateReleaseFossology(Release release, User user) throws TException { assertNotNull(release); assertId(release.getId()); assertUser(user); return handler.updateRelease(release, user, ThriftUtils.immutableOfReleaseForFossology()); }
public boolean test(Release e) { return e.isScriptOutput(value); }
public boolean test(Release e) { return value == e.isScriptRunning(); }
public boolean test(Release e) { return e.isScmTag(value); }
public boolean test(Release e) { return e.isReleaseNotes(value); }
public boolean test(Release e) { return value == e.isReleased(); }