@Test public void testGetResolutions() { assertTrue(operationHandler.getResolutions("").isEmpty()); List<Fraction> res = operationHandler.getResolutions("320x240,1280x720, 1920x1080"); assertEquals(Fraction.getFraction(320, 240), res.get(0)); assertEquals(Fraction.getFraction(1280, 720), res.get(1)); assertEquals(Fraction.getFraction(1920, 1080), res.get(2)); }
List<Fraction> getResolutions(String resolutionsConfig) { List<Fraction> resolutions = new ArrayList<>(); for (String res: resolutionsConfig.split(" *, *")) { if (StringUtils.isNotBlank(res)) { resolutions.add(Fraction.getFraction(res.replace('x', '/'))); } } return resolutions; }
ProbeResolutionWorkflowOperationHandler extends AbstractWorkflowOperationHandler { List<Fraction> getResolutions(String resolutionsConfig) { List<Fraction> resolutions = new ArrayList<>(); for (String res: resolutionsConfig.split(" *, *")) { if (StringUtils.isNotBlank(res)) { resolutions.add(Fraction.getFraction(res.replace('x', '/'))); } } return resolutions; } }
ProbeResolutionWorkflowOperationHandler extends AbstractWorkflowOperationHandler { List<Fraction> getResolutions(String resolutionsConfig) { List<Fraction> resolutions = new ArrayList<>(); for (String res: resolutionsConfig.split(" *, *")) { if (StringUtils.isNotBlank(res)) { resolutions.add(Fraction.getFraction(res.replace('x', '/'))); } } return resolutions; }  }
ProbeResolutionWorkflowOperationHandler extends AbstractWorkflowOperationHandler { List<Fraction> getResolutions(String resolutionsConfig) { List<Fraction> resolutions = new ArrayList<>(); for (String res: resolutionsConfig.split(" *, *")) { if (StringUtils.isNotBlank(res)) { resolutions.add(Fraction.getFraction(res.replace('x', '/'))); } } return resolutions; }  @Override WorkflowOperationResult start(WorkflowInstance workflowInstance, JobContext context); }
ProbeResolutionWorkflowOperationHandler extends AbstractWorkflowOperationHandler { List<Fraction> getResolutions(String resolutionsConfig) { List<Fraction> resolutions = new ArrayList<>(); for (String res: resolutionsConfig.split(" *, *")) { if (StringUtils.isNotBlank(res)) { resolutions.add(Fraction.getFraction(res.replace('x', '/'))); } } return resolutions; }  @Override WorkflowOperationResult start(WorkflowInstance workflowInstance, JobContext context);  }