1. Project Clover database Tue Dec 20 2016 21:24:09 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
130
64
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_MISSINGDEPENDENCY_ID = new ExtensionId("missingdependency", "version");
77   
78    public static final ExtensionId REMOTE_UPGRADE10_ID = new ExtensionId("upgrade", "1.0");
79   
80    public static final ExtensionId REMOTE_UPGRADE20_ID = new ExtensionId("upgrade", "2.0");
81   
82    public static final ExtensionId REMOTE_UPGRADEFEATURE20_ID = new ExtensionId("upgrade-feature", "2.0");
83   
84    public static final ExtensionId REMOTE_UPGRADEWITHFEATURE10_ID = new ExtensionId("upgrade-withfeature", "1.0");
85   
86    public static final ExtensionId REMOTE_UPGRADEWITHDEPENDENCY10_ID =
87    new ExtensionId("upgrade-withdependency", "1.0");
88   
89    public static final ExtensionId REMOTE_UPGRADEWITHDEPENDENCY20_ID =
90    new ExtensionId("upgrade-withdependency", "2.0");
91   
92    public static final ExtensionId REMOTE_OTHERUPGRADEWITHDEPENDENCY20_ID =
93    new ExtensionId("other-upgrade-withdependency", "2.0");
94   
95    public static final ExtensionId REMOTE_ROOTEXTENSION10_ID = new ExtensionId("rootextension", "1.0");
96   
97    public static final ExtensionId REMOTE_ROOTEXTENSION20_ID = new ExtensionId("rootextension", "2.0");
98   
99    public static final ExtensionId REMOTE_UNSUPPORTED_ID = new ExtensionId("unsupported", "version");
100   
101    public static final ExtensionId REMOTE_NOTINSTALLED_ID = new ExtensionId("notinstalledextension", "2.0");
102   
103    public static final ExtensionId REMOTE_NOTINSTALLED_DEPENDENCY_ID =
104    new ExtensionId("notinstalledextensiondependency", "2.0");
105   
106    public static final ExtensionId REMOTE_WITH_ROOT_DEPENDENY10_ID = new ExtensionId("rwithrootdependency", "1.0");
107   
108    public static final ExtensionId REMOTE_WITH_ROOT_DEPENDENY20_ID = new ExtensionId("rwithrootdependency", "2.0");
109   
110    public static final ExtensionId REMOTE_WITH_MANAGED_DEPENDENY_ID =
111    new ExtensionId("rwithmanageddependency", "version");
112   
113    public static final ExtensionId REMOTE_WITH_MANAGED_TRANSITIVEDEPENDENY_ID =
114    new ExtensionId("rwithmanagedtransitivedependency", "version");
115   
116    public static final ExtensionId REMOTE_WITH_OVERWRITTEN_MANAGED_DEPENDENY_ID =
117    new ExtensionId("rwithoverwrittenmanageddependency", "version");
118   
119    // Methods
120   
 
121  23 toggle public void init(InstalledExtensionRepository installedExtensionRepository) throws ResolveException
122    {
123  23 this.installed = installedExtensionRepository.resolve(INSTALLED_ID);
124  23 this.installedDependency = installedExtensionRepository.resolve(INSTALLED_DEPENDENCY_ID);
125  23 this.installedwithfeatureasdependency =
126    installedExtensionRepository.getInstalledExtension(TestResources.INSTALLED_WITHFEATUREASDEPENDENCY_ID);
127  23 this.installedonnemspacewithrootdependency = installedExtensionRepository
128    .getInstalledExtension(TestResources.INSTALLED_ONNAMESPACEWITHROOTDEPENDENCY_ID);
129    }
130    }