SimulationUtils { @Deprecated public static Pattern patternForGlob(String glob) { return RegexUtils.globToPattern(glob); } private  SimulationUtils(); static UniqueId latestViewDefinitionId(String viewDefName, ConfigSource configSource); static Simulation createSimulationFromDsl(String groovyScript, Map<String, Object> parameters); static Simulation createSimulationFromDsl(Reader groovyScript, Map<String, Object> parameters); static Scenario createScenarioFromDsl(String groovyScript, Map<String, Object> parameters); static Scenario createScenarioFromDsl(Reader groovyScript, Map<String, Object> parameters); @Deprecated static Pattern patternForGlob(String glob); static YieldCurveBucketedShift bucketedShift(Period start, Period end, double shift); static YieldCurveDataPointShift pointShift(Period tenor, double shift); static YieldCurvePointShift pointShift(int pointIndex, double shift); static VolatilitySurfaceShift volShift(Object x, Object y, Number shift);  }
@Test public void patternForGlob() { assertEquals("\\Qfoo\\E.\\Qbar\\E", patternFor("foo?bar")); assertEquals(".\\Qfoobar\\E", patternFor("?foobar")); assertEquals("\\Qfoobar\\E.", patternFor("foobar?")); assertEquals("\\Qfoo\\E..\\Qbar\\E", patternFor("foo??bar")); assertEquals("..\\Qfoobar\\E", patternFor("??foobar")); assertEquals("\\Qfoobar\\E..", patternFor("foobar??")); assertEquals(".\\Qfoobar\\E.", patternFor("?foobar?")); assertEquals(".*?\\Qfoobar\\E.*?", patternFor("*foobar%")); assertEquals("\\Qfoo\\E.*?\\Qbar\\E", patternFor("foo*bar")); assertEquals("\\Qf\\E.\\Qoo\\E.*?\\Qbar\\E", patternFor("f?oo*bar")); assertEquals("\\Qf\\E.\\Qoo\\E.*?\\Qbar\\E", patternFor("f?oo%bar")); }