Skip to content

Commit 155597f

Browse files
PaulaRudyPaulaRudy
authored andcommitted
Resized test image to be more managable. Took out stuff not needed for the test. Updated head comment.
1 parent 7b689b1 commit 155597f

2 files changed

Lines changed: 4 additions & 18 deletions

File tree

core/src/test/java/edu/wpi/grip/core/serialization/CompatibilityTest.java

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,45 @@
33
import com.google.common.eventbus.EventBus;
44
import com.google.inject.Guice;
55
import com.google.inject.Injector;
6-
import com.google.inject.Key;
7-
import com.google.inject.TypeLiteral;
8-
import edu.wpi.grip.core.*;
6+
import edu.wpi.grip.core.GRIPCoreModule;
7+
import edu.wpi.grip.core.Pipeline;
98
import edu.wpi.grip.core.operations.Operations;
109
import edu.wpi.grip.core.settings.ProjectSettings;
11-
import edu.wpi.grip.core.sources.ImageFileSource;
1210
import edu.wpi.grip.generated.CVOperations;
1311
import edu.wpi.grip.util.Files;
1412
import org.junit.Before;
1513
import org.junit.Test;
1614

1715
import java.io.*;
1816
import java.net.URI;
19-
import java.util.List;
20-
import java.util.Optional;
2117

2218
import static junit.framework.TestCase.assertEquals;
2319

2420
/**
2521
* This tests for backwards compatibility by opening a project file containing ALL the steps of GRIP
26-
* at the time of this file's creation.
22+
* at the time of this file's creation. Please note that this test requires a webcam at position 0.
2723
*/
2824
public class CompatibilityTest {
2925

3026
private static final URI testphotoURI = Files.testphotoURI; //The location of the photo source for the test
3127
private static final URI testprojectURI = Files.testprojectURI; //The location of the save file for the test
3228

33-
private Connection.Factory<Object> connectionFactory;
34-
private ImageFileSource.Factory imageSourceFactory;
35-
private Step.Factory stepFactory;
3629
private Pipeline pipeline;
3730
private Project project;
3831
private ProjectSettings settings;
3932

40-
private List<Operation> operationList;
41-
private Optional<Throwable> throwableOptional;
4233
private EventBus eventBus;
4334

4435
@Before
4536
public void setUp() throws Exception {
4637

4738
//Set up the stuff we need for the core functionality for GRIP
4839
final Injector injector = Guice.createInjector(new GRIPCoreModule());
49-
connectionFactory = injector
50-
.getInstance(Key.get(new TypeLiteral<Connection.Factory<Object>>() {
51-
}));
52-
imageSourceFactory = injector
53-
.getInstance(ImageFileSource.Factory.class);
40+
5441
eventBus = injector.getInstance(EventBus.class);
5542
pipeline = injector.getInstance(Pipeline.class);
5643
project = injector.getInstance(Project.class);
5744
settings = injector.getInstance(ProjectSettings.class);
58-
stepFactory = injector.getInstance(Step.Factory.class);
5945

6046
//Add the operations so that GRIP will recognize them
6147
Operations.addOperations(eventBus);
-9.47 MB
Loading

0 commit comments

Comments
 (0)