diff --git a/README.md b/README.md
index e125079..34f0393 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,40 @@ Before contributing, read the [guidelines](CONTRIBUTING.md).
This repository follows the [GitFlow branching strategy](https://gitversion.net/docs/learn/branching-strategies/gitflow/examples).
+### Regenerate Assert classes
+
+You may want to regenerate Assert classes after modifying a model element. To do so, you can use the [AssertJ](https://joel-costigliola.github.io/assertj/assertj-assertions-generator-maven-plugin.html#quickstart) plugin.
+
+1. First, run `./mvnw clean compile` to make sure the classes are found.
+2. Delete the classes you want to regenerate.
+3. Then edit the project's pom.xml and add the plugin configuration in the `build` section with the classes/packages you want to regenerate. E.g., in `application-model/pom.xml` add:
+```xml
+
+ org.assertj
+ assertj-assertions-generator-maven-plugin
+ 2.2.0
+
+
+ org.bonitasoft.engine.business.application.impl.ApplicationLinkImpl
+ org.bonitasoft.engine.business.application.xml.ApplicationLinkNode
+ org.bonitasoft.engine.business.application.xml.ApplicationNodeContainer
+
+ true
+ false
+ false
+ false
+ false
+ application-model/src/test/java
+ true
+
+
+```
+4. Then run the following command to regenerate the Assert classes: `./mvnw assertj:generate-assertions -f application-model/pom.xml` (adapt `-f` to your project)
+5. Remove the `@javax.annotation.Generated` annotation from the generated classes and the generated `Assertions.java` file.
+6. Format with `./mvnw spotless:apply`.
+7. Make sure the generated classes satisfy your needs and that you did not corrupt other classes.
+8. Restore the original state of the project's pom.xml file.
+
### Release
To release a new version, maintainers may use the Release and Publication GitHub actions.
diff --git a/application-model/src/main/java/org/bonitasoft/engine/business/application/AdvancedApplication.java b/application-model/src/main/java/org/bonitasoft/engine/business/application/ApplicationLink.java
similarity index 86%
rename from application-model/src/main/java/org/bonitasoft/engine/business/application/AdvancedApplication.java
rename to application-model/src/main/java/org/bonitasoft/engine/business/application/ApplicationLink.java
index 86255c4..aec5691 100644
--- a/application-model/src/main/java/org/bonitasoft/engine/business/application/AdvancedApplication.java
+++ b/application-model/src/main/java/org/bonitasoft/engine/business/application/ApplicationLink.java
@@ -14,7 +14,7 @@
package org.bonitasoft.engine.business.application;
/**
- * Contains the meta information of an advanced Bonita Living Application.
+ * Contains the meta information of a Bonita Living Application as a link.
*/
-public interface AdvancedApplication extends IApplication {
+public interface ApplicationLink extends IApplication {
}
diff --git a/application-model/src/main/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImpl.java b/application-model/src/main/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImpl.java
similarity index 73%
rename from application-model/src/main/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImpl.java
rename to application-model/src/main/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImpl.java
index 6888148..123b77d 100644
--- a/application-model/src/main/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImpl.java
+++ b/application-model/src/main/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImpl.java
@@ -13,16 +13,16 @@
**/
package org.bonitasoft.engine.business.application.impl;
-import org.bonitasoft.engine.business.application.AdvancedApplication;
+import org.bonitasoft.engine.business.application.ApplicationLink;
/**
- * Contains the meta information of an advanced Bonita Living Application.
+ * Contains the meta information of a Bonita Living Application as a link.
*/
-public class AdvancedApplicationImpl extends AbstractApplicationImpl implements AdvancedApplication {
+public class ApplicationLinkImpl extends AbstractApplicationImpl implements ApplicationLink {
private static final long serialVersionUID = -7508775735750437592L;
- public AdvancedApplicationImpl(final String token, final String version, final String description) {
+ public ApplicationLinkImpl(final String token, final String version, final String description) {
super(token, version, description);
}
}
diff --git a/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNode.java b/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNode.java
similarity index 89%
rename from application-model/src/main/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNode.java
rename to application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNode.java
index 48561d1..483ea60 100644
--- a/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNode.java
+++ b/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNode.java
@@ -17,10 +17,10 @@
import javax.xml.bind.annotation.XmlAccessorType;
/**
- * Application node for advanced Bonita Living Application.
+ * Application node for Bonita Living Application as a link.
*/
@XmlAccessorType(XmlAccessType.FIELD)
-public class AdvancedApplicationNode extends AbstractApplicationNode {
+public class ApplicationLinkNode extends AbstractApplicationNode {
/*
* Super implementations of equals and hashCode are enough.
diff --git a/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeBuilder.java b/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeBuilder.java
index 6b09611..80b000b 100644
--- a/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeBuilder.java
+++ b/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeBuilder.java
@@ -39,35 +39,35 @@ public static interface IApplicationBuilder {
public AbstractApplicationNode create();
}
- public static class AdvancedApplicationBuilder implements IApplicationBuilder {
+ public static class ApplicationLinkBuilder implements IApplicationBuilder {
- private final AdvancedApplicationNode applicationNode;
+ private final ApplicationLinkNode applicationNode;
- public AdvancedApplicationBuilder(String token, String displayName, String version) {
- applicationNode = new AdvancedApplicationNode();
+ public ApplicationLinkBuilder(String token, String displayName, String version) {
+ applicationNode = new ApplicationLinkNode();
applicationNode.setToken(token);
applicationNode.setDisplayName(displayName);
applicationNode.setVersion(version);
applicationNode.setState(ApplicationState.ACTIVATED.name());
}
- public AdvancedApplicationBuilder withDescription(String description) {
+ public ApplicationLinkBuilder withDescription(String description) {
applicationNode.setDescription(description);
return this;
}
- public AdvancedApplicationBuilder withIconPath(String iconPath) {
+ public ApplicationLinkBuilder withIconPath(String iconPath) {
applicationNode.setIconPath(iconPath);
return this;
}
- public AdvancedApplicationBuilder withProfile(String profile) {
+ public ApplicationLinkBuilder withProfile(String profile) {
applicationNode.setProfile(profile);
return this;
}
@Override
- public AdvancedApplicationNode create() {
+ public ApplicationLinkNode create() {
return applicationNode;
}
@@ -182,8 +182,8 @@ public static ApplicationNodeContainerBuilder newApplicationContainer() {
return new ApplicationNodeContainerBuilder();
}
- public static AdvancedApplicationBuilder newAdvancedApplication(String token, String displayName, String version) {
- return new AdvancedApplicationBuilder(token, displayName, version);
+ public static ApplicationLinkBuilder newApplicationLink(String token, String displayName, String version) {
+ return new ApplicationLinkBuilder(token, displayName, version);
}
public static ApplicationBuilder newApplication(String token, String displayName, String version) {
diff --git a/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainer.java b/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainer.java
index b541591..07a792f 100644
--- a/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainer.java
+++ b/application-model/src/main/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainer.java
@@ -31,7 +31,7 @@
public class ApplicationNodeContainer {
@XmlElements({
- @XmlElement(name = "advancedApplication", type = AdvancedApplicationNode.class),
+ @XmlElement(name = "applicationLink", type = ApplicationLinkNode.class),
@XmlElement(name = "application", type = ApplicationNode.class) })
private final List allApplications;
@@ -39,9 +39,9 @@ public ApplicationNodeContainer() {
this.allApplications = new ArrayList<>();
}
- public List getAdvancedApplications() {
- return allApplications.stream().filter(AdvancedApplicationNode.class::isInstance)
- .map(AdvancedApplicationNode.class::cast).collect(Collectors.toList());
+ public List getApplicationLinks() {
+ return allApplications.stream().filter(ApplicationLinkNode.class::isInstance)
+ .map(ApplicationLinkNode.class::cast).collect(Collectors.toList());
}
public List getApplications() {
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/exporter/ApplicationNodeContainerConverterTest.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/exporter/ApplicationNodeContainerConverterTest.java
index 0dac24a..32f1288 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/exporter/ApplicationNodeContainerConverterTest.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/exporter/ApplicationNodeContainerConverterTest.java
@@ -16,9 +16,9 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.tuple;
-import static org.bonitasoft.engine.business.application.xml.ApplicationNodeBuilder.newAdvancedApplication;
import static org.bonitasoft.engine.business.application.xml.ApplicationNodeBuilder.newApplication;
import static org.bonitasoft.engine.business.application.xml.ApplicationNodeBuilder.newApplicationContainer;
+import static org.bonitasoft.engine.business.application.xml.ApplicationNodeBuilder.newApplicationLink;
import javax.xml.bind.UnmarshalException;
@@ -32,12 +32,12 @@ class ApplicationNodeContainerConverterTest {
@Test
void should_marshall_applicationContainer_to_xml() throws Exception {
try (var inputStream = ApplicationNodeContainerConverterTest.class
- .getResourceAsStream("/advancedApplication.xml")) {
+ .getResourceAsStream("/applicationLink.xml")) {
assertThat(inputStream).isNotNull();
var expectedXml = new String(inputStream.readAllBytes());
final byte[] xml = converter.marshallToXML(newApplicationContainer()
- .havingApplications(newAdvancedApplication("myApp", "My App", "1.0")).create());
+ .havingApplications(newApplicationLink("myApp", "My App", "1.0")).create());
assertThat(xml).isNotNull();
assertThat(new String(xml)).isEqualToIgnoringNewLines(expectedXml);
@@ -47,12 +47,12 @@ void should_marshall_applicationContainer_to_xml() throws Exception {
@Test
void should_unmarshall_xml_into_applicationContainer() throws Exception {
try (var inputStream = ApplicationNodeContainerConverterTest.class
- .getResourceAsStream("/advancedApplication.xml")) {
+ .getResourceAsStream("/applicationLink.xml")) {
assertThat(inputStream).isNotNull();
final ApplicationNodeContainer container = converter.unmarshallFromXML(inputStream.readAllBytes());
assertThat(container).isNotNull();
- assertThat(container.getAdvancedApplications()).extracting("token", "displayName", "version")
+ assertThat(container.getApplicationLinks()).extracting("token", "displayName", "version")
.contains(tuple("myApp", "My App", "1.0"));
}
}
@@ -92,7 +92,7 @@ void should_marshall_mixedApplicationContainer_to_xml() throws Exception {
final byte[] xml = converter.marshallToXML(newApplicationContainer()
.havingApplications(newApplication("myApp", "My App", "1.0"),
- newAdvancedApplication("myAdvancedApp", "My App 2", "2.0"))
+ newApplicationLink("myLinkedApp", "My App 2", "2.0"))
.create());
assertThat(xml).isNotNull();
@@ -109,14 +109,14 @@ void should_unmarshall_xml_into_mixedApplicationContainer() throws Exception {
assertThat(container).isNotNull();
assertThat(container.getAllApplications()).extracting("token", "displayName", "version")
- .containsExactly(tuple("myApp", "My App", "1.0"), tuple("myAdvancedApp", "My App 2", "2.0"));
+ .containsExactly(tuple("myApp", "My App", "1.0"), tuple("myLinkedApp", "My App 2", "2.0"));
}
}
@Test
void should_fail_unmarshall_xml_into_applicationContainer() throws Exception {
try (var inputStream = ApplicationNodeContainerConverterTest.class
- .getResourceAsStream("/badAdvancedApplication.xml")) {
+ .getResourceAsStream("/badApplicationLink.xml")) {
assertThat(inputStream).isNotNull();
assertThatExceptionOfType(UnmarshalException.class)
.isThrownBy(() -> converter.unmarshallFromXML(inputStream.readAllBytes()));
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImplAssert.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImplAssert.java
similarity index 56%
rename from application-model/src/test/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImplAssert.java
rename to application-model/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImplAssert.java
index 1397bf8..d914e70 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImplAssert.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImplAssert.java
@@ -17,41 +17,40 @@
import org.assertj.core.util.Objects;
/**
- * {@link AdvancedApplicationImpl} specific assertions - Generated by CustomAssertionGenerator.
+ * {@link ApplicationLinkImpl} specific assertions - Generated by CustomAssertionGenerator.
*/
-public class AdvancedApplicationImplAssert
- extends AbstractObjectAssert {
+public class ApplicationLinkImplAssert extends AbstractObjectAssert {
/**
- * Creates a new {@link AdvancedApplicationImplAssert}
to make assertions on actual AdvancedApplicationImpl.
+ * Creates a new {@link ApplicationLinkImplAssert}
to make assertions on actual ApplicationLinkImpl.
*
- * @param actual the AdvancedApplicationImpl we want to make assertions on.
+ * @param actual the ApplicationLinkImpl we want to make assertions on.
*/
- public AdvancedApplicationImplAssert(AdvancedApplicationImpl actual) {
- super(actual, AdvancedApplicationImplAssert.class);
+ public ApplicationLinkImplAssert(ApplicationLinkImpl actual) {
+ super(actual, ApplicationLinkImplAssert.class);
}
/**
- * An entry point for AdvancedApplicationImplAssert to follow AssertJ standard assertThat()
statements.
- * With a static import, one can write directly: assertThat(myAdvancedApplicationImpl)
and get specific assertion with code completion.
+ * An entry point for ApplicationLinkImplAssert to follow AssertJ standard assertThat()
statements.
+ * With a static import, one can write directly: assertThat(myApplicationLinkImpl)
and get specific assertion with code completion.
*
- * @param actual the AdvancedApplicationImpl we want to make assertions on.
- * @return a new {@link AdvancedApplicationImplAssert}
+ * @param actual the ApplicationLinkImpl we want to make assertions on.
+ * @return a new {@link ApplicationLinkImplAssert}
*/
@org.assertj.core.util.CheckReturnValue
- public static AdvancedApplicationImplAssert assertThat(AdvancedApplicationImpl actual) {
- return new AdvancedApplicationImplAssert(actual);
+ public static ApplicationLinkImplAssert assertThat(ApplicationLinkImpl actual) {
+ return new ApplicationLinkImplAssert(actual);
}
/**
- * Verifies that the actual AdvancedApplicationImpl's createdBy is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's createdBy is equal to the given one.
*
- * @param createdBy the given createdBy to compare the actual AdvancedApplicationImpl's createdBy to.
+ * @param createdBy the given createdBy to compare the actual ApplicationLinkImpl's createdBy to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's createdBy is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's createdBy is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasCreatedBy(long createdBy) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasCreatedBy(long createdBy) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -68,14 +67,14 @@ public AdvancedApplicationImplAssert hasCreatedBy(long createdBy) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's creationDate is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's creationDate is equal to the given one.
*
- * @param creationDate the given creationDate to compare the actual AdvancedApplicationImpl's creationDate to.
+ * @param creationDate the given creationDate to compare the actual ApplicationLinkImpl's creationDate to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's creationDate is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's creationDate is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasCreationDate(java.util.Date creationDate) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasCreationDate(java.util.Date creationDate) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -92,14 +91,14 @@ public AdvancedApplicationImplAssert hasCreationDate(java.util.Date creationDate
}
/**
- * Verifies that the actual AdvancedApplicationImpl's description is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's description is equal to the given one.
*
- * @param description the given description to compare the actual AdvancedApplicationImpl's description to.
+ * @param description the given description to compare the actual ApplicationLinkImpl's description to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's description is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's description is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasDescription(String description) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasDescription(String description) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -116,14 +115,14 @@ public AdvancedApplicationImplAssert hasDescription(String description) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's displayName is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's displayName is equal to the given one.
*
- * @param displayName the given displayName to compare the actual AdvancedApplicationImpl's displayName to.
+ * @param displayName the given displayName to compare the actual ApplicationLinkImpl's displayName to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's displayName is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's displayName is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasDisplayName(String displayName) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasDisplayName(String displayName) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -140,18 +139,18 @@ public AdvancedApplicationImplAssert hasDisplayName(String displayName) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl is editable.
+ * Verifies that the actual ApplicationLinkImpl is editable.
*
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl is not editable.
+ * @throws AssertionError - if the actual ApplicationLinkImpl is not editable.
*/
- public AdvancedApplicationImplAssert isEditable() {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert isEditable() {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// check that property call/field access is true
if (!actual.isEditable()) {
- failWithMessage("\nExpecting that actual AdvancedApplicationImpl is editable but is not.");
+ failWithMessage("\nExpecting that actual ApplicationLinkImpl is editable but is not.");
}
// return the current assertion for method chaining
@@ -159,18 +158,18 @@ public AdvancedApplicationImplAssert isEditable() {
}
/**
- * Verifies that the actual AdvancedApplicationImpl is not editable.
+ * Verifies that the actual ApplicationLinkImpl is not editable.
*
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl is editable.
+ * @throws AssertionError - if the actual ApplicationLinkImpl is editable.
*/
- public AdvancedApplicationImplAssert isNotEditable() {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert isNotEditable() {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// check that property call/field access is false
if (actual.isEditable()) {
- failWithMessage("\nExpecting that actual AdvancedApplicationImpl is not editable but is.");
+ failWithMessage("\nExpecting that actual ApplicationLinkImpl is not editable but is.");
}
// return the current assertion for method chaining
@@ -178,18 +177,18 @@ public AdvancedApplicationImplAssert isNotEditable() {
}
/**
- * Verifies that the actual AdvancedApplicationImpl has icon.
+ * Verifies that the actual ApplicationLinkImpl has icon.
*
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl does not have icon.
+ * @throws AssertionError - if the actual ApplicationLinkImpl does not have icon.
*/
- public AdvancedApplicationImplAssert hasIcon() {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasIcon() {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// check that property call/field access is true
if (!actual.hasIcon()) {
- failWithMessage("\nExpecting that actual AdvancedApplicationImpl has icon but does not have.");
+ failWithMessage("\nExpecting that actual ApplicationLinkImpl has icon but does not have.");
}
// return the current assertion for method chaining
@@ -197,18 +196,18 @@ public AdvancedApplicationImplAssert hasIcon() {
}
/**
- * Verifies that the actual AdvancedApplicationImpl does not have icon.
+ * Verifies that the actual ApplicationLinkImpl does not have icon.
*
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl has icon.
+ * @throws AssertionError - if the actual ApplicationLinkImpl has icon.
*/
- public AdvancedApplicationImplAssert doesNotHaveIcon() {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert doesNotHaveIcon() {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// check that property call/field access is false
if (actual.hasIcon()) {
- failWithMessage("\nExpecting that actual AdvancedApplicationImpl does not have icon but has.");
+ failWithMessage("\nExpecting that actual ApplicationLinkImpl does not have icon but has.");
}
// return the current assertion for method chaining
@@ -216,14 +215,14 @@ public AdvancedApplicationImplAssert doesNotHaveIcon() {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's iconPath is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's iconPath is equal to the given one.
*
- * @param iconPath the given iconPath to compare the actual AdvancedApplicationImpl's iconPath to.
+ * @param iconPath the given iconPath to compare the actual ApplicationLinkImpl's iconPath to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's iconPath is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's iconPath is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasIconPath(String iconPath) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasIconPath(String iconPath) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -240,14 +239,14 @@ public AdvancedApplicationImplAssert hasIconPath(String iconPath) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's id is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's id is equal to the given one.
*
- * @param id the given id to compare the actual AdvancedApplicationImpl's id to.
+ * @param id the given id to compare the actual ApplicationLinkImpl's id to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's id is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's id is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasId(long id) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasId(long id) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -264,14 +263,14 @@ public AdvancedApplicationImplAssert hasId(long id) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's lastUpdateDate is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's lastUpdateDate is equal to the given one.
*
- * @param lastUpdateDate the given lastUpdateDate to compare the actual AdvancedApplicationImpl's lastUpdateDate to.
+ * @param lastUpdateDate the given lastUpdateDate to compare the actual ApplicationLinkImpl's lastUpdateDate to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's lastUpdateDate is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's lastUpdateDate is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasLastUpdateDate(java.util.Date lastUpdateDate) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasLastUpdateDate(java.util.Date lastUpdateDate) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -288,14 +287,14 @@ public AdvancedApplicationImplAssert hasLastUpdateDate(java.util.Date lastUpdate
}
/**
- * Verifies that the actual AdvancedApplicationImpl's profileId is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's profileId is equal to the given one.
*
- * @param profileId the given profileId to compare the actual AdvancedApplicationImpl's profileId to.
+ * @param profileId the given profileId to compare the actual ApplicationLinkImpl's profileId to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's profileId is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's profileId is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasProfileId(Long profileId) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasProfileId(Long profileId) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -312,14 +311,14 @@ public AdvancedApplicationImplAssert hasProfileId(Long profileId) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's state is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's state is equal to the given one.
*
- * @param state the given state to compare the actual AdvancedApplicationImpl's state to.
+ * @param state the given state to compare the actual ApplicationLinkImpl's state to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's state is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's state is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasState(String state) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasState(String state) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -336,14 +335,14 @@ public AdvancedApplicationImplAssert hasState(String state) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's token is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's token is equal to the given one.
*
- * @param token the given token to compare the actual AdvancedApplicationImpl's token to.
+ * @param token the given token to compare the actual ApplicationLinkImpl's token to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's token is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's token is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasToken(String token) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasToken(String token) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -360,14 +359,14 @@ public AdvancedApplicationImplAssert hasToken(String token) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's updatedBy is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's updatedBy is equal to the given one.
*
- * @param updatedBy the given updatedBy to compare the actual AdvancedApplicationImpl's updatedBy to.
+ * @param updatedBy the given updatedBy to compare the actual ApplicationLinkImpl's updatedBy to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's updatedBy is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's updatedBy is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasUpdatedBy(long updatedBy) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasUpdatedBy(long updatedBy) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -384,14 +383,14 @@ public AdvancedApplicationImplAssert hasUpdatedBy(long updatedBy) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's version is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's version is equal to the given one.
*
- * @param version the given version to compare the actual AdvancedApplicationImpl's version to.
+ * @param version the given version to compare the actual ApplicationLinkImpl's version to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's version is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's version is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasVersion(String version) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ public ApplicationLinkImplAssert hasVersion(String version) {
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -408,15 +407,15 @@ public AdvancedApplicationImplAssert hasVersion(String version) {
}
/**
- * Verifies that the actual AdvancedApplicationImpl's visibility is equal to the given one.
+ * Verifies that the actual ApplicationLinkImpl's visibility is equal to the given one.
*
- * @param visibility the given visibility to compare the actual AdvancedApplicationImpl's visibility to.
+ * @param visibility the given visibility to compare the actual ApplicationLinkImpl's visibility to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationImpl's visibility is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkImpl's visibility is not equal to the given one.
*/
- public AdvancedApplicationImplAssert hasVisibility(
+ public ApplicationLinkImplAssert hasVisibility(
org.bonitasoft.engine.business.application.ApplicationVisibility visibility) {
- // check that actual AdvancedApplicationImpl we want to make assertions on is not null.
+ // check that actual ApplicationLinkImpl we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImplTest.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImplTest.java
similarity index 83%
rename from application-model/src/test/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImplTest.java
rename to application-model/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImplTest.java
index ed41bc6..82356ad 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/AdvancedApplicationImplTest.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationLinkImplTest.java
@@ -13,7 +13,7 @@
**/
package org.bonitasoft.engine.business.application.impl;
-import static org.bonitasoft.engine.business.application.impl.AdvancedApplicationImplAssert.assertThat;
+import static org.bonitasoft.engine.business.application.impl.ApplicationLinkImplAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@@ -23,7 +23,7 @@
import org.bonitasoft.engine.business.application.ApplicationVisibility;
import org.junit.jupiter.api.Test;
-class AdvancedApplicationImplTest {
+class ApplicationLinkImplTest {
@Test
void setters_and_getters_are_ok() {
@@ -41,7 +41,7 @@ void setters_and_getters_are_ok() {
String state = ApplicationState.ACTIVATED.name();
//when
- AdvancedApplicationImpl application = new AdvancedApplicationImpl(token, version, description);
+ ApplicationLinkImpl application = new ApplicationLinkImpl(token, version, description);
application.setUpdatedBy(updatedBy);
application.setProfileId(profileId);
application.setHasIcon(true);
@@ -70,8 +70,8 @@ void equals_should_return_true_on_different_applications_with_same_content() {
String description = "hr description";
//when
- AdvancedApplicationImpl application1 = new AdvancedApplicationImpl(token, version, description);
- AdvancedApplicationImpl application2 = new AdvancedApplicationImpl(token, version, description);
+ ApplicationLinkImpl application1 = new ApplicationLinkImpl(token, version, description);
+ ApplicationLinkImpl application2 = new ApplicationLinkImpl(token, version, description);
// then
assertThat(application1).isEqualTo(application2);
@@ -86,7 +86,7 @@ void equals_should_return_false_on_legacy_applications_with_same_content() {
String description = "hr description";
//when
- AdvancedApplicationImpl application1 = new AdvancedApplicationImpl(token, version, description);
+ ApplicationLinkImpl application1 = new ApplicationLinkImpl(token, version, description);
ApplicationImpl application2 = new ApplicationImpl(token, version, description);
// then
@@ -102,9 +102,9 @@ void equals_should_return_false_on_different_applications_with_different_content
String description = "hr description";
//when
- AdvancedApplicationImpl application1 = new AdvancedApplicationImpl(token, version, description);
+ ApplicationLinkImpl application1 = new ApplicationLinkImpl(token, version, description);
application1.setIconPath("/img.png");
- AdvancedApplicationImpl application2 = new AdvancedApplicationImpl(token, version, description);
+ ApplicationLinkImpl application2 = new ApplicationLinkImpl(token, version, description);
application1.setIconPath("/img.jpg");
// then
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNodeAssert.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNodeAssert.java
similarity index 56%
rename from application-model/src/test/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNodeAssert.java
rename to application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNodeAssert.java
index c8b728a..57f2611 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNodeAssert.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNodeAssert.java
@@ -17,41 +17,40 @@
import org.assertj.core.util.Objects;
/**
- * {@link AdvancedApplicationNode} specific assertions - Generated by CustomAssertionGenerator.
+ * {@link ApplicationLinkNode} specific assertions - Generated by CustomAssertionGenerator.
*/
-public class AdvancedApplicationNodeAssert
- extends AbstractObjectAssert {
+public class ApplicationLinkNodeAssert extends AbstractObjectAssert {
/**
- * Creates a new {@link AdvancedApplicationNodeAssert}
to make assertions on actual AdvancedApplicationNode.
+ * Creates a new {@link ApplicationLinkNodeAssert}
to make assertions on actual ApplicationLinkNode.
*
- * @param actual the AdvancedApplicationNode we want to make assertions on.
+ * @param actual the ApplicationLinkNode we want to make assertions on.
*/
- public AdvancedApplicationNodeAssert(AdvancedApplicationNode actual) {
- super(actual, AdvancedApplicationNodeAssert.class);
+ public ApplicationLinkNodeAssert(ApplicationLinkNode actual) {
+ super(actual, ApplicationLinkNodeAssert.class);
}
/**
- * An entry point for AdvancedApplicationNodeAssert to follow AssertJ standard assertThat()
statements.
- * With a static import, one can write directly: assertThat(myAdvancedApplicationNode)
and get specific assertion with code completion.
+ * An entry point for ApplicationLinkNodeAssert to follow AssertJ standard assertThat()
statements.
+ * With a static import, one can write directly: assertThat(myApplicationLinkNode)
and get specific assertion with code completion.
*
- * @param actual the AdvancedApplicationNode we want to make assertions on.
- * @return a new {@link AdvancedApplicationNodeAssert}
+ * @param actual the ApplicationLinkNode we want to make assertions on.
+ * @return a new {@link ApplicationLinkNodeAssert}
*/
@org.assertj.core.util.CheckReturnValue
- public static AdvancedApplicationNodeAssert assertThat(AdvancedApplicationNode actual) {
- return new AdvancedApplicationNodeAssert(actual);
+ public static ApplicationLinkNodeAssert assertThat(ApplicationLinkNode actual) {
+ return new ApplicationLinkNodeAssert(actual);
}
/**
- * Verifies that the actual AdvancedApplicationNode's description is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's description is equal to the given one.
*
- * @param description the given description to compare the actual AdvancedApplicationNode's description to.
+ * @param description the given description to compare the actual ApplicationLinkNode's description to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's description is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's description is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasDescription(String description) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasDescription(String description) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -68,14 +67,14 @@ public AdvancedApplicationNodeAssert hasDescription(String description) {
}
/**
- * Verifies that the actual AdvancedApplicationNode's displayName is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's displayName is equal to the given one.
*
- * @param displayName the given displayName to compare the actual AdvancedApplicationNode's displayName to.
+ * @param displayName the given displayName to compare the actual ApplicationLinkNode's displayName to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's displayName is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's displayName is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasDisplayName(String displayName) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasDisplayName(String displayName) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -92,14 +91,14 @@ public AdvancedApplicationNodeAssert hasDisplayName(String displayName) {
}
/**
- * Verifies that the actual AdvancedApplicationNode's iconPath is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's iconPath is equal to the given one.
*
- * @param iconPath the given iconPath to compare the actual AdvancedApplicationNode's iconPath to.
+ * @param iconPath the given iconPath to compare the actual ApplicationLinkNode's iconPath to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's iconPath is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's iconPath is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasIconPath(String iconPath) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasIconPath(String iconPath) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -116,14 +115,14 @@ public AdvancedApplicationNodeAssert hasIconPath(String iconPath) {
}
/**
- * Verifies that the actual AdvancedApplicationNode's profile is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's profile is equal to the given one.
*
- * @param profile the given profile to compare the actual AdvancedApplicationNode's profile to.
+ * @param profile the given profile to compare the actual ApplicationLinkNode's profile to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's profile is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's profile is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasProfile(String profile) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasProfile(String profile) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -140,14 +139,14 @@ public AdvancedApplicationNodeAssert hasProfile(String profile) {
}
/**
- * Verifies that the actual AdvancedApplicationNode's state is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's state is equal to the given one.
*
- * @param state the given state to compare the actual AdvancedApplicationNode's state to.
+ * @param state the given state to compare the actual ApplicationLinkNode's state to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's state is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's state is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasState(String state) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasState(String state) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -164,14 +163,14 @@ public AdvancedApplicationNodeAssert hasState(String state) {
}
/**
- * Verifies that the actual AdvancedApplicationNode's token is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's token is equal to the given one.
*
- * @param token the given token to compare the actual AdvancedApplicationNode's token to.
+ * @param token the given token to compare the actual ApplicationLinkNode's token to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's token is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's token is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasToken(String token) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasToken(String token) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
@@ -188,14 +187,14 @@ public AdvancedApplicationNodeAssert hasToken(String token) {
}
/**
- * Verifies that the actual AdvancedApplicationNode's version is equal to the given one.
+ * Verifies that the actual ApplicationLinkNode's version is equal to the given one.
*
- * @param version the given version to compare the actual AdvancedApplicationNode's version to.
+ * @param version the given version to compare the actual ApplicationLinkNode's version to.
* @return this assertion object.
- * @throws AssertionError - if the actual AdvancedApplicationNode's version is not equal to the given one.
+ * @throws AssertionError - if the actual ApplicationLinkNode's version is not equal to the given one.
*/
- public AdvancedApplicationNodeAssert hasVersion(String version) {
- // check that actual AdvancedApplicationNode we want to make assertions on is not null.
+ public ApplicationLinkNodeAssert hasVersion(String version) {
+ // check that actual ApplicationLinkNode we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNodeTest.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNodeTest.java
similarity index 73%
rename from application-model/src/test/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNodeTest.java
rename to application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNodeTest.java
index 7a27fe6..caf307c 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/AdvancedApplicationNodeTest.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationLinkNodeTest.java
@@ -13,11 +13,11 @@
**/
package org.bonitasoft.engine.business.application.xml;
-import static org.bonitasoft.engine.business.application.xml.AdvancedApplicationNodeAssert.assertThat;
+import static org.bonitasoft.engine.business.application.xml.ApplicationLinkNodeAssert.assertThat;
import org.junit.jupiter.api.Test;
-class AdvancedApplicationNodeTest {
+class ApplicationLinkNodeTest {
@Test
void simple_setters_and_getters_are_working() {
@@ -31,7 +31,7 @@ void simple_setters_and_getters_are_working() {
final String state = "ACTIVATED";
//when
- final AdvancedApplicationNode app = new AdvancedApplicationNode();
+ final ApplicationLinkNode app = new ApplicationLinkNode();
app.setDisplayName(displayName);
app.setDescription(description);
app.setIconPath(iconPath);
@@ -48,19 +48,19 @@ void simple_setters_and_getters_are_working() {
@Test
void equals_should_return_true_on_different_applications_with_same_content() {
- AdvancedApplicationNode applicationNode1 = ApplicationNodeBuilder
- .newAdvancedApplication("appToken", "appName", "1.0")
+ ApplicationLinkNode applicationNode1 = ApplicationNodeBuilder
+ .newApplicationLink("appToken", "appName", "1.0")
.create();
- AdvancedApplicationNode applicationNode2 = ApplicationNodeBuilder
- .newAdvancedApplication("appToken", "appName", "1.0")
+ ApplicationLinkNode applicationNode2 = ApplicationNodeBuilder
+ .newApplicationLink("appToken", "appName", "1.0")
.create();
assertThat(applicationNode1).isEqualTo(applicationNode2);
}
@Test
void equals_should_return_false_on_legacy_applications_with_same_content() {
- AdvancedApplicationNode applicationNode1 = ApplicationNodeBuilder
- .newAdvancedApplication("appToken", "appName", "1.0")
+ ApplicationLinkNode applicationNode1 = ApplicationNodeBuilder
+ .newApplicationLink("appToken", "appName", "1.0")
.create();
ApplicationNode applicationNode2 = ApplicationNodeBuilder.newApplication("appToken", "appName", "1.0")
.create();
@@ -69,12 +69,12 @@ void equals_should_return_false_on_legacy_applications_with_same_content() {
@Test
void equals_should_return_false_on_different_applications_with_different_content() {
- AdvancedApplicationNode applicationNode1 = ApplicationNodeBuilder
- .newAdvancedApplication("appToken", "appName", "1.0")
+ ApplicationLinkNode applicationNode1 = ApplicationNodeBuilder
+ .newApplicationLink("appToken", "appName", "1.0")
.withIconPath("/img1.png")
.create();
- AdvancedApplicationNode applicationNode2 = ApplicationNodeBuilder
- .newAdvancedApplication("appToken", "appName", "1.0")
+ ApplicationLinkNode applicationNode2 = ApplicationNodeBuilder
+ .newApplicationLink("appToken", "appName", "1.0")
.withIconPath("/img1.gif")
.create();
assertThat(applicationNode1).isNotEqualTo(applicationNode2);
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerAssert.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerAssert.java
index 8213689..46394f7 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerAssert.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerAssert.java
@@ -44,166 +44,164 @@ public static ApplicationNodeContainerAssert assertThat(ApplicationNodeContainer
}
/**
- * Verifies that the actual ApplicationNodeContainer's advancedApplications contains the given AdvancedApplicationNode elements.
+ * Verifies that the actual ApplicationNodeContainer's allApplications contains the given AbstractApplicationNode elements.
*
- * @param advancedApplications the given elements that should be contained in actual ApplicationNodeContainer's advancedApplications.
+ * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications does not contain all given AdvancedApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
*/
- public ApplicationNodeContainerAssert hasAdvancedApplications(AdvancedApplicationNode... advancedApplications) {
+ public ApplicationNodeContainerAssert hasAllApplications(AbstractApplicationNode... allApplications) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AdvancedApplicationNode varargs is not null.
- if (advancedApplications == null)
- failWithMessage("Expecting advancedApplications parameter not to be null.");
+ // check that given AbstractApplicationNode varargs is not null.
+ if (allApplications == null)
+ failWithMessage("Expecting allApplications parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContains(info, actual.getAdvancedApplications(), advancedApplications);
+ Iterables.instance().assertContains(info, actual.getAllApplications(), allApplications);
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's advancedApplications contains the given AdvancedApplicationNode elements in Collection.
+ * Verifies that the actual ApplicationNodeContainer's allApplications contains the given AbstractApplicationNode elements in Collection.
*
- * @param advancedApplications the given elements that should be contained in actual ApplicationNodeContainer's advancedApplications.
+ * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications does not contain all given AdvancedApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
*/
- public ApplicationNodeContainerAssert hasAdvancedApplications(
- java.util.Collection extends AdvancedApplicationNode> advancedApplications) {
+ public ApplicationNodeContainerAssert hasAllApplications(
+ java.util.Collection extends AbstractApplicationNode> allApplications) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AdvancedApplicationNode collection is not null.
- if (advancedApplications == null) {
- failWithMessage("Expecting advancedApplications parameter not to be null.");
+ // check that given AbstractApplicationNode collection is not null.
+ if (allApplications == null) {
+ failWithMessage("Expecting allApplications parameter not to be null.");
return this; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContains(info, actual.getAdvancedApplications(), advancedApplications.toArray());
+ Iterables.instance().assertContains(info, actual.getAllApplications(), allApplications.toArray());
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's advancedApplications contains only the given AdvancedApplicationNode elements and nothing else in
+ * Verifies that the actual ApplicationNodeContainer's allApplications contains only the given AbstractApplicationNode elements and nothing else in
* whatever order.
*
- * @param advancedApplications the given elements that should be contained in actual ApplicationNodeContainer's advancedApplications.
+ * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications does not contain all given AdvancedApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
*/
- public ApplicationNodeContainerAssert hasOnlyAdvancedApplications(AdvancedApplicationNode... advancedApplications) {
+ public ApplicationNodeContainerAssert hasOnlyAllApplications(AbstractApplicationNode... allApplications) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AdvancedApplicationNode varargs is not null.
- if (advancedApplications == null)
- failWithMessage("Expecting advancedApplications parameter not to be null.");
+ // check that given AbstractApplicationNode varargs is not null.
+ if (allApplications == null)
+ failWithMessage("Expecting allApplications parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContainsOnly(info, actual.getAdvancedApplications(), advancedApplications);
+ Iterables.instance().assertContainsOnly(info, actual.getAllApplications(), allApplications);
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's advancedApplications contains only the given AdvancedApplicationNode elements in Collection and
- * nothing else in whatever order.
+ * Verifies that the actual ApplicationNodeContainer's allApplications contains only the given AbstractApplicationNode elements in Collection and nothing
+ * else in whatever order.
*
- * @param advancedApplications the given elements that should be contained in actual ApplicationNodeContainer's advancedApplications.
+ * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications does not contain all given AdvancedApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
*/
- public ApplicationNodeContainerAssert hasOnlyAdvancedApplications(
- java.util.Collection extends AdvancedApplicationNode> advancedApplications) {
+ public ApplicationNodeContainerAssert hasOnlyAllApplications(
+ java.util.Collection extends AbstractApplicationNode> allApplications) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AdvancedApplicationNode collection is not null.
- if (advancedApplications == null) {
- failWithMessage("Expecting advancedApplications parameter not to be null.");
+ // check that given AbstractApplicationNode collection is not null.
+ if (allApplications == null) {
+ failWithMessage("Expecting allApplications parameter not to be null.");
return this; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContainsOnly(info, actual.getAdvancedApplications(), advancedApplications.toArray());
+ Iterables.instance().assertContainsOnly(info, actual.getAllApplications(), allApplications.toArray());
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's advancedApplications does not contain the given AdvancedApplicationNode elements.
+ * Verifies that the actual ApplicationNodeContainer's allApplications does not contain the given AbstractApplicationNode elements.
*
- * @param advancedApplications the given elements that should not be in actual ApplicationNodeContainer's advancedApplications.
+ * @param allApplications the given elements that should not be in actual ApplicationNodeContainer's allApplications.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications contains any given AdvancedApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications contains any given AbstractApplicationNode elements.
*/
- public ApplicationNodeContainerAssert doesNotHaveAdvancedApplications(
- AdvancedApplicationNode... advancedApplications) {
+ public ApplicationNodeContainerAssert doesNotHaveAllApplications(AbstractApplicationNode... allApplications) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AdvancedApplicationNode varargs is not null.
- if (advancedApplications == null)
- failWithMessage("Expecting advancedApplications parameter not to be null.");
+ // check that given AbstractApplicationNode varargs is not null.
+ if (allApplications == null)
+ failWithMessage("Expecting allApplications parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
- Iterables.instance().assertDoesNotContain(info, actual.getAdvancedApplications(), advancedApplications);
+ Iterables.instance().assertDoesNotContain(info, actual.getAllApplications(), allApplications);
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's advancedApplications does not contain the given AdvancedApplicationNode elements in Collection.
+ * Verifies that the actual ApplicationNodeContainer's allApplications does not contain the given AbstractApplicationNode elements in Collection.
*
- * @param advancedApplications the given elements that should not be in actual ApplicationNodeContainer's advancedApplications.
+ * @param allApplications the given elements that should not be in actual ApplicationNodeContainer's allApplications.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications contains any given AdvancedApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications contains any given AbstractApplicationNode elements.
*/
- public ApplicationNodeContainerAssert doesNotHaveAdvancedApplications(
- java.util.Collection extends AdvancedApplicationNode> advancedApplications) {
+ public ApplicationNodeContainerAssert doesNotHaveAllApplications(
+ java.util.Collection extends AbstractApplicationNode> allApplications) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AdvancedApplicationNode collection is not null.
- if (advancedApplications == null) {
- failWithMessage("Expecting advancedApplications parameter not to be null.");
+ // check that given AbstractApplicationNode collection is not null.
+ if (allApplications == null) {
+ failWithMessage("Expecting allApplications parameter not to be null.");
return this; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message (use overridingErrorMessage before contains to set your own message).
- Iterables.instance().assertDoesNotContain(info, actual.getAdvancedApplications(),
- advancedApplications.toArray());
+ Iterables.instance().assertDoesNotContain(info, actual.getAllApplications(), allApplications.toArray());
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer has no advancedApplications.
+ * Verifies that the actual ApplicationNodeContainer has no allApplications.
*
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's advancedApplications is not empty.
+ * @throws AssertionError if the actual ApplicationNodeContainer's allApplications is not empty.
*/
- public ApplicationNodeContainerAssert hasNoAdvancedApplications() {
+ public ApplicationNodeContainerAssert hasNoAllApplications() {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
// we override the default error message with a more explicit one
- String assertjErrorMessage = "\nExpecting :\n <%s>\nnot to have advancedApplications but had :\n <%s>";
+ String assertjErrorMessage = "\nExpecting :\n <%s>\nnot to have allApplications but had :\n <%s>";
// check
- if (actual.getAdvancedApplications().iterator().hasNext()) {
- failWithMessage(assertjErrorMessage, actual, actual.getAdvancedApplications());
+ if (actual.getAllApplications().iterator().hasNext()) {
+ failWithMessage(assertjErrorMessage, actual, actual.getAllApplications());
}
// return the current assertion for method chaining
@@ -211,164 +209,164 @@ public ApplicationNodeContainerAssert hasNoAdvancedApplications() {
}
/**
- * Verifies that the actual ApplicationNodeContainer's allApplications contains the given AbstractApplicationNode elements.
+ * Verifies that the actual ApplicationNodeContainer's applicationLinks contains the given ApplicationLinkNode elements.
*
- * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
+ * @param applicationLinks the given elements that should be contained in actual ApplicationNodeContainer's applicationLinks.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks does not contain all given ApplicationLinkNode elements.
*/
- public ApplicationNodeContainerAssert hasAllApplications(AbstractApplicationNode... allApplications) {
+ public ApplicationNodeContainerAssert hasApplicationLinks(ApplicationLinkNode... applicationLinks) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AbstractApplicationNode varargs is not null.
- if (allApplications == null)
- failWithMessage("Expecting allApplications parameter not to be null.");
+ // check that given ApplicationLinkNode varargs is not null.
+ if (applicationLinks == null)
+ failWithMessage("Expecting applicationLinks parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContains(info, actual.getAllApplications(), allApplications);
+ Iterables.instance().assertContains(info, actual.getApplicationLinks(), applicationLinks);
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's allApplications contains the given AbstractApplicationNode elements in Collection.
+ * Verifies that the actual ApplicationNodeContainer's applicationLinks contains the given ApplicationLinkNode elements in Collection.
*
- * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
+ * @param applicationLinks the given elements that should be contained in actual ApplicationNodeContainer's applicationLinks.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks does not contain all given ApplicationLinkNode elements.
*/
- public ApplicationNodeContainerAssert hasAllApplications(
- java.util.Collection extends AbstractApplicationNode> allApplications) {
+ public ApplicationNodeContainerAssert hasApplicationLinks(
+ java.util.Collection extends ApplicationLinkNode> applicationLinks) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AbstractApplicationNode collection is not null.
- if (allApplications == null) {
- failWithMessage("Expecting allApplications parameter not to be null.");
+ // check that given ApplicationLinkNode collection is not null.
+ if (applicationLinks == null) {
+ failWithMessage("Expecting applicationLinks parameter not to be null.");
return this; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContains(info, actual.getAllApplications(), allApplications.toArray());
+ Iterables.instance().assertContains(info, actual.getApplicationLinks(), applicationLinks.toArray());
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's allApplications contains only the given AbstractApplicationNode elements and nothing else in
- * whatever order.
+ * Verifies that the actual ApplicationNodeContainer's applicationLinks contains only the given ApplicationLinkNode elements and nothing else in whatever
+ * order.
*
- * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
+ * @param applicationLinks the given elements that should be contained in actual ApplicationNodeContainer's applicationLinks.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks does not contain all given ApplicationLinkNode elements.
*/
- public ApplicationNodeContainerAssert hasOnlyAllApplications(AbstractApplicationNode... allApplications) {
+ public ApplicationNodeContainerAssert hasOnlyApplicationLinks(ApplicationLinkNode... applicationLinks) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AbstractApplicationNode varargs is not null.
- if (allApplications == null)
- failWithMessage("Expecting allApplications parameter not to be null.");
+ // check that given ApplicationLinkNode varargs is not null.
+ if (applicationLinks == null)
+ failWithMessage("Expecting applicationLinks parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContainsOnly(info, actual.getAllApplications(), allApplications);
+ Iterables.instance().assertContainsOnly(info, actual.getApplicationLinks(), applicationLinks);
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's allApplications contains only the given AbstractApplicationNode elements in Collection and nothing
+ * Verifies that the actual ApplicationNodeContainer's applicationLinks contains only the given ApplicationLinkNode elements in Collection and nothing
* else in whatever order.
*
- * @param allApplications the given elements that should be contained in actual ApplicationNodeContainer's allApplications.
+ * @param applicationLinks the given elements that should be contained in actual ApplicationNodeContainer's applicationLinks.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications does not contain all given AbstractApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks does not contain all given ApplicationLinkNode elements.
*/
- public ApplicationNodeContainerAssert hasOnlyAllApplications(
- java.util.Collection extends AbstractApplicationNode> allApplications) {
+ public ApplicationNodeContainerAssert hasOnlyApplicationLinks(
+ java.util.Collection extends ApplicationLinkNode> applicationLinks) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AbstractApplicationNode collection is not null.
- if (allApplications == null) {
- failWithMessage("Expecting allApplications parameter not to be null.");
+ // check that given ApplicationLinkNode collection is not null.
+ if (applicationLinks == null) {
+ failWithMessage("Expecting applicationLinks parameter not to be null.");
return this; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
- Iterables.instance().assertContainsOnly(info, actual.getAllApplications(), allApplications.toArray());
+ Iterables.instance().assertContainsOnly(info, actual.getApplicationLinks(), applicationLinks.toArray());
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's allApplications does not contain the given AbstractApplicationNode elements.
+ * Verifies that the actual ApplicationNodeContainer's applicationLinks does not contain the given ApplicationLinkNode elements.
*
- * @param allApplications the given elements that should not be in actual ApplicationNodeContainer's allApplications.
+ * @param applicationLinks the given elements that should not be in actual ApplicationNodeContainer's applicationLinks.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications contains any given AbstractApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks contains any given ApplicationLinkNode elements.
*/
- public ApplicationNodeContainerAssert doesNotHaveAllApplications(AbstractApplicationNode... allApplications) {
+ public ApplicationNodeContainerAssert doesNotHaveApplicationLinks(ApplicationLinkNode... applicationLinks) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AbstractApplicationNode varargs is not null.
- if (allApplications == null)
- failWithMessage("Expecting allApplications parameter not to be null.");
+ // check that given ApplicationLinkNode varargs is not null.
+ if (applicationLinks == null)
+ failWithMessage("Expecting applicationLinks parameter not to be null.");
// check with standard error message (use overridingErrorMessage before contains to set your own message).
- Iterables.instance().assertDoesNotContain(info, actual.getAllApplications(), allApplications);
+ Iterables.instance().assertDoesNotContain(info, actual.getApplicationLinks(), applicationLinks);
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer's allApplications does not contain the given AbstractApplicationNode elements in Collection.
+ * Verifies that the actual ApplicationNodeContainer's applicationLinks does not contain the given ApplicationLinkNode elements in Collection.
*
- * @param allApplications the given elements that should not be in actual ApplicationNodeContainer's allApplications.
+ * @param applicationLinks the given elements that should not be in actual ApplicationNodeContainer's applicationLinks.
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications contains any given AbstractApplicationNode elements.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks contains any given ApplicationLinkNode elements.
*/
- public ApplicationNodeContainerAssert doesNotHaveAllApplications(
- java.util.Collection extends AbstractApplicationNode> allApplications) {
+ public ApplicationNodeContainerAssert doesNotHaveApplicationLinks(
+ java.util.Collection extends ApplicationLinkNode> applicationLinks) {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
- // check that given AbstractApplicationNode collection is not null.
- if (allApplications == null) {
- failWithMessage("Expecting allApplications parameter not to be null.");
+ // check that given ApplicationLinkNode collection is not null.
+ if (applicationLinks == null) {
+ failWithMessage("Expecting applicationLinks parameter not to be null.");
return this; // to fool Eclipse "Null pointer access" warning on toArray.
}
// check with standard error message (use overridingErrorMessage before contains to set your own message).
- Iterables.instance().assertDoesNotContain(info, actual.getAllApplications(), allApplications.toArray());
+ Iterables.instance().assertDoesNotContain(info, actual.getApplicationLinks(), applicationLinks.toArray());
// return the current assertion for method chaining
return this;
}
/**
- * Verifies that the actual ApplicationNodeContainer has no allApplications.
+ * Verifies that the actual ApplicationNodeContainer has no applicationLinks.
*
* @return this assertion object.
- * @throws AssertionError if the actual ApplicationNodeContainer's allApplications is not empty.
+ * @throws AssertionError if the actual ApplicationNodeContainer's applicationLinks is not empty.
*/
- public ApplicationNodeContainerAssert hasNoAllApplications() {
+ public ApplicationNodeContainerAssert hasNoApplicationLinks() {
// check that actual ApplicationNodeContainer we want to make assertions on is not null.
isNotNull();
// we override the default error message with a more explicit one
- String assertjErrorMessage = "\nExpecting :\n <%s>\nnot to have allApplications but had :\n <%s>";
+ String assertjErrorMessage = "\nExpecting :\n <%s>\nnot to have applicationLinks but had :\n <%s>";
// check
- if (actual.getAllApplications().iterator().hasNext()) {
- failWithMessage(assertjErrorMessage, actual, actual.getAllApplications());
+ if (actual.getApplicationLinks().iterator().hasNext()) {
+ failWithMessage(assertjErrorMessage, actual, actual.getApplicationLinks());
}
// return the current assertion for method chaining
diff --git a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerTest.java b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerTest.java
index 880d073..b21a347 100644
--- a/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerTest.java
+++ b/application-model/src/test/java/org/bonitasoft/engine/business/application/xml/ApplicationNodeContainerTest.java
@@ -29,12 +29,12 @@ void getApplications_should_return_empty_list_when_has_no_elements() {
}
@Test
- void addAdvancedApplication_should_add_new_entry_to_application_list() {
+ void addApplicationLink_should_add_new_entry_to_application_list() {
//given
- AdvancedApplicationNode app1 = new AdvancedApplicationNode();
+ ApplicationLinkNode app1 = new ApplicationLinkNode();
app1.setToken("app1");
- AdvancedApplicationNode app2 = new AdvancedApplicationNode();
+ ApplicationLinkNode app2 = new ApplicationLinkNode();
app2.setToken("app2");
ApplicationNodeContainer container = new ApplicationNodeContainer();
@@ -44,7 +44,7 @@ void addAdvancedApplication_should_add_new_entry_to_application_list() {
container.addApplication(app2);
//then
- assertThat(container).hasAdvancedApplications(app1, app2)
+ assertThat(container).hasApplicationLinks(app1, app2)
.hasAllApplications(app1, app2);
}
diff --git a/application-model/src/test/resources/advancedApplication.xml b/application-model/src/test/resources/applicationLink.xml
similarity index 66%
rename from application-model/src/test/resources/advancedApplication.xml
rename to application-model/src/test/resources/applicationLink.xml
index 5e77683..d11dc0b 100644
--- a/application-model/src/test/resources/advancedApplication.xml
+++ b/application-model/src/test/resources/applicationLink.xml
@@ -1,6 +1,6 @@
-
+
My App
-
+
diff --git a/application-model/src/test/resources/badAdvancedApplication.xml b/application-model/src/test/resources/badApplicationLink.xml
similarity index 71%
rename from application-model/src/test/resources/badAdvancedApplication.xml
rename to application-model/src/test/resources/badApplicationLink.xml
index 5ac6ff1..60e6fbe 100644
--- a/application-model/src/test/resources/badAdvancedApplication.xml
+++ b/application-model/src/test/resources/badApplicationLink.xml
@@ -1,6 +1,6 @@
-
+
My App
-
+
\ No newline at end of file
diff --git a/application-model/src/test/resources/mixedApplications.xml b/application-model/src/test/resources/mixedApplications.xml
index 0dec1d2..cfaeb85 100644
--- a/application-model/src/test/resources/mixedApplications.xml
+++ b/application-model/src/test/resources/mixedApplications.xml
@@ -5,7 +5,7 @@
-
+
My App 2
-
+