complete Studio core and JavaFX boundary migration
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 64.01% (20482/31999)
* Branch Coverage: 54.22% (8240/15196)
* Lines of Code: 31999
* Cyclomatic Complexity: 13164
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 715
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 64.01% (20482/31999)
* Branch Coverage: 54.22% (8240/15196)
* Lines of Code: 31999
* Cyclomatic Complexity: 13164
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 715
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package p.studio.app;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.packer.events.PackerEvent;
|
||||
import p.packer.events.PackerEventKind;
|
||||
import p.packer.events.PackerProgress;
|
||||
import p.studio.ui.javafx.events.StudioEventBus;
|
||||
import p.studio.ui.javafx.events.StudioPackerOperationEvent;
|
||||
import p.studio.ui.javafx.events.StudioPackerOperationKind;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
final class StudioPackerEventAdapterTest {
|
||||
@Test
|
||||
void translatesProviderEventsIntoStudioEvents() {
|
||||
final StudioEventBus globalBus = new StudioEventBus();
|
||||
final List<StudioPackerOperationEvent> events = new ArrayList<>();
|
||||
globalBus.subscribe(StudioPackerOperationEvent.class, events::add);
|
||||
|
||||
new StudioPackerEventAdapter(globalBus).publish(new PackerEvent(
|
||||
"main", "op-1", 0L, PackerEventKind.ASSET_DISCOVERED, Instant.now(),
|
||||
"Discovered asset.", new PackerProgress(0.25d, false), List.of("ui_atlas")));
|
||||
|
||||
assertEquals(1, events.size());
|
||||
assertEquals(StudioPackerOperationKind.ASSET_DISCOVERED, events.getFirst().kind());
|
||||
assertEquals(0.25d, events.getFirst().progress());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user