Cleaner collection iteration. FIxed file layout in dirs for tests.

Edward M. Kagan 5 years ago
parent 3ed3853017
commit f8c8f2c9a6

@ -40,16 +40,18 @@ public class OperationResult {
public boolean ok () {
boolean proxiedOK = proxiedOK();
if (!proxiedOK) { for (OperationMessage message : this.messages) { System.out.println(message.toString()); } }
if (!proxiedOK) { this.messages.forEach(message -> {
System.out.println(message.toString());
});
}
return proxiedOK;
}
private boolean proxiedOK () {
if (this.messages.stream().anyMatch(message -> (message.type().equals(MessageType.FAIL)))) { return false; }
if (!this.subresults.stream().noneMatch(subresult -> (!subresult.ok()))) { return false; }
return true;
if (this.messages.stream().anyMatch(message -> (message.type().equals(MessageType.FAIL)))) {
return false;
}
return this.subresults.stream().noneMatch(subresult -> (!subresult.ok()));
}
public long timestamp () {

@ -1,6 +1,8 @@
package link.pagan.traqtor;
import com.fasterxml.jackson.core.JsonProcessingException;
import link.pagan.traqtor.Traqtor;
import link.pagan.traqtor.Workspace;
import link.pagan.traqtor.project.universe.UniverseProject;
import link.pagan.traqtor.project.universe.Universe;
import link.pagan.traqtor.project.universe.element.Element;

@ -9,7 +9,7 @@ import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
/** @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} */
public class IoTest {
public class WorkspaceTest {
@BeforeEach
public void cleanTestDir () throws IOException {
Loading…
Cancel
Save