1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.extension

File TestResources.java

 

Coverage histogram

../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
4
1
1
137
68
1
0.25
4
1
1

Classes

Class Line # Actions
TestResources 24 4 0% 1 0
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.extension;
21   
22    import org.xwiki.extension.repository.InstalledExtensionRepository;
23   
 
24    public class TestResources
25    {
26    // Core
27   
28    public static final ExtensionId CORE_ID = new ExtensionId("coreextension", "version");
29   
30    // Installed
31   
32    public static final ExtensionId INSTALLED_ID = new ExtensionId("installedextension", "1.0");
33   
34    public static final ExtensionId INSTALLED_INVALID_ID = new ExtensionId("installedextensioninvalid", "version");
35   
36    public static final ExtensionId INSTALLED_DEPENDENCY_ID = new ExtensionId("installedextensiondependency", "1.0");
37   
38    public static final ExtensionId INSTALLED_ONNAMESPACE_ID = new ExtensionId("installedonnamespace", "version");
39   
40    public static final ExtensionId INSTALLED_ONNAMESPACEWITHROOTDEPENDENCY_ID =
41    new ExtensionId("installedonnemspacewithrootdependency", "version");
42   
43    public static final ExtensionId INSTALLED_WITHFEATUREONNAMESPACE_ID =
44    new ExtensionId("installedwithfeatureonnamespace", "version");
45   
46    public static final ExtensionId INSTALLED_WITHFEATUREASDEPENDENCY_ID =
47    new ExtensionId("installedwithfeatureasdependency", "version");
48   
49    public static final ExtensionId INSTALLED_WITHMISSINDEPENDENCY_ID =
50    new ExtensionId("installedwithmissingdependency", "version");
51   
52    public InstalledExtension installed;
53   
54    public InstalledExtension installedDependency;
55   
56    public InstalledExtension installedwithfeatureasdependency;
57   
58    public InstalledExtension installedonnemspacewithrootdependency;
59   
60    // Remote
61   
62    public static final ExtensionId REMOTE_SIMPLE_ID = new ExtensionId("rsimple", "version");
63   
64    public static final ExtensionId REMOTE_WITHRDEPENDENCY_ID = new ExtensionId("rwithrdependency", "version");
65   
66    public static final ExtensionId REMOTE_WITHCDEPENDENCY_ID = new ExtensionId("rwithcdependency", "version");
67   
68    public static final ExtensionId REMOTE_WITHLDEPENDENCY_ID = new ExtensionId("rwithldependency", "version");
69   
70    public static final ExtensionId REMOTE_WITHRANDCDEPENDENCIES_ID =
71    new ExtensionId("rwithrandcdependencies", "version");
72   
73    public static final ExtensionId REMOTE_WITHRMISSINGDEPENDENCY_ID =
74    new ExtensionId("rwithmissingdependency", "version");
75   
76    public static final ExtensionId REMOTE_WITHRMISSINGOPTIONALDEPENDENCY_ID =
77    new ExtensionId("rwithmissingoptionaldependency", "version");
78   
79    public static final ExtensionId REMOTE_MISSINGDEPENDENCY_ID = new ExtensionId("missingdependency", "version");
80   
81    public static final ExtensionId REMOTE_UPGRADE10_ID = new ExtensionId("upgrade", "1.0");
82   
83    public static final ExtensionId REMOTE_UPGRADE20_ID = new ExtensionId("upgrade", "2.0");
84   
85    public static final ExtensionId REMOTE_UPGRADEFEATURE20_ID = new ExtensionId("upgrade-feature", "2.0");
86   
87    public static final ExtensionId REMOTE_UPGRADEWITHFEATURE10_ID = new ExtensionId("upgrade-withfeature", "1.0");
88   
89    public static final ExtensionId REMOTE_UPGRADEWITHDEPENDENCY10_ID =
90    new ExtensionId("upgrade-withdependency", "1.0");
91   
92    public static final ExtensionId REMOTE_UPGRADEWITHDEPENDENCY20_ID =
93    new ExtensionId("upgrade-withdependency", "2.0");
94   
95    public static final ExtensionId REMOTE_OTHERUPGRADEWITHDEPENDENCY20_ID =
96    new ExtensionId("other-upgrade-withdependency", "2.0");
97   
98    public static final ExtensionId REMOTE_ROOTEXTENSION10_ID = new ExtensionId("rootextension", "1.0");
99   
100    public static final ExtensionId REMOTE_ROOTEXTENSION20_ID = new ExtensionId("rootextension", "2.0");
101   
102    public static final ExtensionId REMOTE_UNSUPPORTED_ID = new ExtensionId("unsupported", "version");
103   
104    public static final ExtensionId REMOTE_NOTINSTALLED_ID = new ExtensionId("notinstalledextension", "2.0");
105   
106    public static final ExtensionId REMOTE_NOTINSTALLED_DEPENDENCY_ID =
107    new ExtensionId("notinstalledextensiondependency", "2.0");
108   
109    public static final ExtensionId REMOTE_WITH_ROOT_DEPENDENY10_ID = new ExtensionId("rwithrootdependency", "1.0");
110   
111    public static final ExtensionId REMOTE_WITH_ROOT_DEPENDENY20_ID = new ExtensionId("rwithrootdependency", "2.0");
112   
113    public static final ExtensionId REMOTE_WITH_MANAGED_DEPENDENY_ID =
114    new ExtensionId("rwithmanageddependency", "version");
115   
116    public static final ExtensionId REMOTE_WITH_MANAGED_TRANSITIVEDEPENDENY_ID =
117    new ExtensionId("rwithmanagedtransitivedependency", "version");
118   
119    public static final ExtensionId REMOTE_WITH_OVERWRITTEN_MANAGED_DEPENDENY_ID =
120    new ExtensionId("rwithoverwrittenmanageddependency", "version");
121   
122    public static final ExtensionId REMOTE_CROSSDEPENDENCY1 = new ExtensionId("crossdependency1", "version");
123   
124    public static final ExtensionId REMOTE_CROSSDEPENDENCY2 = new ExtensionId("crossdependency2", "version");
125   
126    // Methods
127   
 
128  23 toggle public void init(InstalledExtensionRepository installedExtensionRepository) throws ResolveException
129    {
130  23 this.installed = installedExtensionRepository.resolve(INSTALLED_ID);
131  23 this.installedDependency = installedExtensionRepository.resolve(INSTALLED_DEPENDENCY_ID);
132  23 this.installedwithfeatureasdependency =
133    installedExtensionRepository.getInstalledExtension(TestResources.INSTALLED_WITHFEATUREASDEPENDENCY_ID);
134  23 this.installedonnemspacewithrootdependency = installedExtensionRepository
135    .getInstalledExtension(TestResources.INSTALLED_ONNAMESPACEWITHROOTDEPENDENCY_ID);
136    }
137    }