예제 #1
0
  @BeforeClass
  public static void setUpBaseClass() {
    System.setProperty("shootoff.home", System.getProperty("user.dir"));
    Configuration.disableErrorReporting();
    TrainingExerciseBase.silence(true);

    nu.pattern.OpenCV.loadShared();

    Logger rootLogger = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
    rootLogger.detachAndStopAllAppenders();
  }
  @Test
  public void testReset() throws ConfigurationException {
    nu.pattern.OpenCV.loadShared();

    DeduplicationProcessor deduplicationProcessor =
        new DeduplicationProcessor(new MockCameraManager());

    assertFalse(deduplicationProcessor.getLastShot().isPresent());

    Shot shot = new Shot(Color.GREEN, 0, 0, 0, 0);

    deduplicationProcessor.processShot(shot);

    assertTrue(deduplicationProcessor.getLastShot().isPresent());

    deduplicationProcessor.reset();

    assertFalse(deduplicationProcessor.getLastShot().isPresent());
  }