Skip to content

Commit 0f9c122

Browse files
committed
test(gradle-api): keep only the unit tests that guard behaviour
Merges near-identical cases into parameterized tables, drops tests that duplicate the functional tests or pinned implementation details, and removes two getters only those tests read.
1 parent bf19f23 commit 0f9c122

5 files changed

Lines changed: 450 additions & 1169 deletions

File tree

‎gradle-api/src/main/java/org/nativescript/gradle/internal/Facts.java‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public final class Facts {
3737
private static final Map<String, CachedFacts> CACHE = new ConcurrentHashMap<>();
3838

3939
private final File file;
40-
private final int schemaVersion;
4140
private final String dependenciesJsonSha256;
4241
private final Set<String> capabilities;
4342
private final File projectRoot;
@@ -47,15 +46,13 @@ public final class Facts {
4746

4847
private Facts(
4948
File file,
50-
int schemaVersion,
5149
String dependenciesJsonSha256,
5250
Set<String> capabilities,
5351
File projectRoot,
5452
File appDir,
5553
File appResourcesDir,
5654
Map<String, PluginData> plugins) {
5755
this.file = file;
58-
this.schemaVersion = schemaVersion;
5956
this.dependenciesJsonSha256 = dependenciesJsonSha256;
6057
this.capabilities = Collections.unmodifiableSet(capabilities);
6158
this.projectRoot = projectRoot;
@@ -168,7 +165,7 @@ public static Facts parse(File file, String text) {
168165
}
169166

170167
return new Facts(
171-
file, schemaVersion, dependenciesJsonSha256, capabilities, projectRoot, appDir, appResourcesDir, plugins);
168+
file, dependenciesJsonSha256, capabilities, projectRoot, appDir, appResourcesDir, plugins);
172169
}
173170

174171
private static GradleException invalid(File file, String problem) {
@@ -220,15 +217,6 @@ public File getFile() {
220217
return file;
221218
}
222219

223-
public int getSchemaVersion() {
224-
return schemaVersion;
225-
}
226-
227-
/** Null if the writer did not record it. */
228-
public String getDependenciesJsonSha256() {
229-
return dependenciesJsonSha256;
230-
}
231-
232220
public Set<String> getCapabilities() {
233221
return capabilities;
234222
}

0 commit comments

Comments
 (0)