mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-26 08:37:11 -07:00
Improvement to offline operation, now pushed to the actual operations instead of the commands
This commit is contained in:
parent
d904fd22b7
commit
a02e78820e
13 changed files with 146 additions and 33 deletions
|
@ -22,6 +22,7 @@ public class TestDependencyTreeOperation {
|
|||
@Test
|
||||
void testInstantiation() {
|
||||
var operation = new DependencyTreeOperation();
|
||||
assertFalse(operation.offline());
|
||||
assertEquals(operation.properties().size(), 0);
|
||||
assertTrue(operation.dependencies().isEmpty());
|
||||
assertTrue(operation.repositories().isEmpty());
|
||||
|
@ -55,7 +56,9 @@ public class TestDependencyTreeOperation {
|
|||
assertTrue(operation2.dependencies().scope(Scope.compile).contains(dependency2));
|
||||
|
||||
var operation3 = new DependencyTreeOperation()
|
||||
.offline(true)
|
||||
.repositories(repository1, repository2);
|
||||
assertTrue(operation3.offline());
|
||||
assertTrue(operation3.repositories().contains(repository1));
|
||||
assertTrue(operation3.repositories().contains(repository2));
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ public class TestDownloadOperation {
|
|||
@Test
|
||||
void testInstantiation() {
|
||||
var operation = new DownloadOperation();
|
||||
assertFalse(operation.offline());
|
||||
assertTrue(operation.dependencies().isEmpty());
|
||||
assertTrue(operation.repositories().isEmpty());
|
||||
assertNull(operation.libCompileDirectory());
|
||||
|
@ -81,7 +82,9 @@ public class TestDownloadOperation {
|
|||
assertEquals(dir5, operation2.libTestDirectory());
|
||||
|
||||
var operation3 = new DownloadOperation()
|
||||
.offline(true)
|
||||
.repositories(repository1, repository2);
|
||||
assertTrue(operation3.offline());
|
||||
assertTrue(operation3.repositories().contains(repository1));
|
||||
assertTrue(operation3.repositories().contains(repository2));
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ public class TestPublishOperation {
|
|||
@Test
|
||||
void testInstantiation() {
|
||||
var operation = new PublishOperation();
|
||||
assertFalse(operation.offline());
|
||||
assertTrue(operation.repositories().isEmpty());
|
||||
assertNull(operation.moment());
|
||||
assertTrue(operation.dependencies().isEmpty());
|
||||
|
@ -109,10 +110,12 @@ public class TestPublishOperation {
|
|||
assertTrue(operation2.artifacts().contains(artifact2));
|
||||
|
||||
var operation3 = new PublishOperation()
|
||||
.offline(true)
|
||||
.repository(repository1)
|
||||
.repository(repository2)
|
||||
.moment(moment)
|
||||
.artifacts(List.of(artifact1, artifact2));
|
||||
assertTrue(operation3.offline());
|
||||
operation3.publishProperties().mavenCompilerSource(17).mavenCompilerTarget(19);
|
||||
assertTrue(operation3.repositories().contains(repository1));
|
||||
assertTrue(operation3.repositories().contains(repository2));
|
||||
|
|
|
@ -19,6 +19,7 @@ public class TestPurgeOperation {
|
|||
@Test
|
||||
void testInstantiation() {
|
||||
var operation = new PurgeOperation();
|
||||
assertFalse(operation.offline());
|
||||
assertTrue(operation.dependencies().isEmpty());
|
||||
assertTrue(operation.repositories().isEmpty());
|
||||
assertNull(operation.libCompileDirectory());
|
||||
|
@ -81,7 +82,9 @@ public class TestPurgeOperation {
|
|||
assertEquals(dir5, operation2.libTestDirectory());
|
||||
|
||||
var operation3 = new PurgeOperation()
|
||||
.offline(true)
|
||||
.repositories(repository1, repository2);
|
||||
assertTrue(operation3.offline());
|
||||
assertTrue(operation3.repositories().contains(repository1));
|
||||
assertTrue(operation3.repositories().contains(repository2));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue