Search in sources :

Example 6 with DefaultVersionConstraint

use of org.xwiki.extension.version.internal.DefaultVersionConstraint in project xwiki-platform by xwiki.

the class RepositoryTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    // base extension informations
    this.baseExtension = getRepositoryTestUtils().getTestExtension(new ExtensionId(IDPREFIX + "macro-jar-extension", "1.0"), "jar");
    this.baseExtension.setName("Macro JAR extension");
    this.baseExtension.setDescription("extension description");
    this.baseExtension.setSummary("extension summary, **not bold**");
    this.baseLicense = new ExtensionLicense("Do What The Fuck You Want To Public License 2", null);
    this.baseExtension.addLicense(this.baseLicense);
    this.baseAuthor = new DefaultExtensionAuthor("User Name", getUtil().getURL("XWiki", USER_CREDENTIALS.getUserName()));
    this.baseExtension.addAuthor(this.baseAuthor);
    this.baseExtension.addDependency(new DefaultExtensionDependency("dependencyid1", new DefaultVersionConstraint("1.0")));
    this.baseExtension.addDependency(new DefaultExtensionDependency("dependencyid2", new DefaultVersionConstraint("2.0")));
    this.sizeOfFile = FileUtils.sizeOf(this.baseExtension.getFile().getFile());
}
Also used : ExtensionLicense(org.xwiki.extension.ExtensionLicense) DefaultExtensionAuthor(org.xwiki.extension.DefaultExtensionAuthor) DefaultVersionConstraint(org.xwiki.extension.version.internal.DefaultVersionConstraint) ExtensionId(org.xwiki.extension.ExtensionId) DefaultExtensionDependency(org.xwiki.extension.DefaultExtensionDependency) Before(org.junit.Before)

Aggregations

DefaultExtensionDependency (org.xwiki.extension.DefaultExtensionDependency)6 DefaultVersionConstraint (org.xwiki.extension.version.internal.DefaultVersionConstraint)6 ExtensionId (org.xwiki.extension.ExtensionId)5 Test (org.junit.Test)3 DependencyPane (org.xwiki.extension.test.po.DependencyPane)3 ExtensionAdministrationPage (org.xwiki.extension.test.po.ExtensionAdministrationPage)3 ExtensionPane (org.xwiki.extension.test.po.ExtensionPane)3 TestExtension (org.xwiki.repository.test.TestExtension)3 Before (org.junit.Before)2 LogItemPane (org.xwiki.extension.test.po.LogItemPane)2 SearchResultsPane (org.xwiki.extension.test.po.SearchResultsPane)2 SimpleSearchPane (org.xwiki.extension.test.po.SimpleSearchPane)2 XWikiContext (com.xpn.xwiki.XWikiContext)1 BaseObject (com.xpn.xwiki.objects.BaseObject)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 AdministrationPage (org.xwiki.administration.test.po.AdministrationPage)1 DefaultExtensionAuthor (org.xwiki.extension.DefaultExtensionAuthor)1 ExtensionDependency (org.xwiki.extension.ExtensionDependency)1 ExtensionLicense (org.xwiki.extension.ExtensionLicense)1