mirror of https://github.com/apache/lucene.git
SOLR-10333: Fixes use of HashedMap in StreamEvaluator tests
This commit is contained in:
parent
92297b5860
commit
4171ef79b4
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.AbsoluteValueEvaluator;
|
import org.apache.solr.client.solrj.io.eval.AbsoluteValueEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class AbsoluteValueEvaluatorTest extends LuceneTestCase {
|
public class AbsoluteValueEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class AbsoluteValueEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("abs", AbsoluteValueEvaluator.class);
|
.withFunctionName("abs", AbsoluteValueEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class AddEvaluatorTest extends LuceneTestCase {
|
public class AddEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class AddEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("add", AddEvaluator.class);
|
.withFunctionName("add", AddEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.AndEvaluator;
|
import org.apache.solr.client.solrj.io.eval.AndEvaluator;
|
||||||
|
@ -28,6 +26,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class AndEvaluatorTest extends LuceneTestCase {
|
public class AndEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -38,7 +38,7 @@ public class AndEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("and", AndEvaluator.class);
|
.withFunctionName("and", AndEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
||||||
|
@ -34,6 +32,8 @@ import org.apache.solr.client.solrj.io.eval.SubtractEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class CompoundEvaluatorTest extends LuceneTestCase {
|
public class CompoundEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -50,7 +50,7 @@ public class CompoundEvaluatorTest extends LuceneTestCase {
|
||||||
.withFunctionName("sub", SubtractEvaluator.class)
|
.withFunctionName("sub", SubtractEvaluator.class)
|
||||||
.withFunctionName("mult", MultiplyEvaluator.class)
|
.withFunctionName("mult", MultiplyEvaluator.class)
|
||||||
.withFunctionName("if", IfThenElseEvaluator.class);
|
.withFunctionName("if", IfThenElseEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.DivideEvaluator;
|
import org.apache.solr.client.solrj.io.eval.DivideEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class DivideEvaluatorTest extends LuceneTestCase {
|
public class DivideEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class DivideEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("div", DivideEvaluator.class);
|
.withFunctionName("div", DivideEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -122,7 +122,7 @@ public class DivideEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
@Test(expected = IOException.class)
|
@Test(expected = IOException.class)
|
||||||
public void divManyFieldsWithValues() throws Exception{
|
public void divManyFieldsWithValues() throws Exception{
|
||||||
StreamEvaluator evaluator = factory.constructEvaluator("div(a,b,c,d)");
|
factory.constructEvaluator("div(a,b,c,d)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.EqualsEvaluator;
|
import org.apache.solr.client.solrj.io.eval.EqualsEvaluator;
|
||||||
|
@ -30,6 +28,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class EqualsEvaluatorTest extends LuceneTestCase {
|
public class EqualsEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -42,7 +42,7 @@ public class EqualsEvaluatorTest extends LuceneTestCase {
|
||||||
.withFunctionName("eq", EqualsEvaluator.class)
|
.withFunctionName("eq", EqualsEvaluator.class)
|
||||||
.withFunctionName("val", RawValueEvaluator.class)
|
.withFunctionName("val", RawValueEvaluator.class)
|
||||||
;
|
;
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.ExclusiveOrEvaluator;
|
import org.apache.solr.client.solrj.io.eval.ExclusiveOrEvaluator;
|
||||||
|
@ -28,6 +26,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class ExclusiveOrEvaluatorTest extends LuceneTestCase {
|
public class ExclusiveOrEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -38,7 +38,7 @@ public class ExclusiveOrEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("eor", ExclusiveOrEvaluator.class);
|
.withFunctionName("eor", ExclusiveOrEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.GreaterThanEqualToEvaluator;
|
import org.apache.solr.client.solrj.io.eval.GreaterThanEqualToEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class GreaterThanEqualToEvaluatorTest extends LuceneTestCase {
|
public class GreaterThanEqualToEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class GreaterThanEqualToEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("gte", GreaterThanEqualToEvaluator.class);
|
.withFunctionName("gte", GreaterThanEqualToEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.GreaterThanEvaluator;
|
import org.apache.solr.client.solrj.io.eval.GreaterThanEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class GreaterThanEvaluatorTest extends LuceneTestCase {
|
public class GreaterThanEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class GreaterThanEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("gt", GreaterThanEvaluator.class);
|
.withFunctionName("gt", GreaterThanEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.LessThanEqualToEvaluator;
|
import org.apache.solr.client.solrj.io.eval.LessThanEqualToEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class LessThanEqualToEvaluatorTest extends LuceneTestCase {
|
public class LessThanEqualToEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class LessThanEqualToEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("lte", LessThanEqualToEvaluator.class);
|
.withFunctionName("lte", LessThanEqualToEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.LessThanEvaluator;
|
import org.apache.solr.client.solrj.io.eval.LessThanEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class LessThanEvaluatorTest extends LuceneTestCase {
|
public class LessThanEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class LessThanEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("lt", LessThanEvaluator.class);
|
.withFunctionName("lt", LessThanEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.MultiplyEvaluator;
|
import org.apache.solr.client.solrj.io.eval.MultiplyEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class MultiplyEvaluatorTest extends LuceneTestCase {
|
public class MultiplyEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class MultiplyEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("mult", MultiplyEvaluator.class);
|
.withFunctionName("mult", MultiplyEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
||||||
|
@ -30,6 +28,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class NaturalLogEvaluatorTest extends LuceneTestCase {
|
public class NaturalLogEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -40,7 +40,7 @@ public class NaturalLogEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("log", NaturalLogEvaluator.class).withFunctionName("add", AddEvaluator.class);
|
.withFunctionName("log", NaturalLogEvaluator.class).withFunctionName("add", AddEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,18 +16,18 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
|
||||||
import org.apache.solr.client.solrj.io.eval.NotEvaluator;
|
import org.apache.solr.client.solrj.io.eval.NotEvaluator;
|
||||||
|
import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class NotEvaluatorTest extends LuceneTestCase {
|
public class NotEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -38,7 +38,7 @@ public class NotEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("not", NotEvaluator.class);
|
.withFunctionName("not", NotEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.OrEvaluator;
|
import org.apache.solr.client.solrj.io.eval.OrEvaluator;
|
||||||
|
@ -28,6 +26,8 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class OrEvaluatorTest extends LuceneTestCase {
|
public class OrEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -38,7 +38,7 @@ public class OrEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("or", OrEvaluator.class);
|
.withFunctionName("or", OrEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
import org.apache.solr.client.solrj.io.eval.AddEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.RawValueEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class RawValueEvaluatorTest extends LuceneTestCase {
|
public class RawValueEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -42,7 +42,7 @@ public class RawValueEvaluatorTest extends LuceneTestCase {
|
||||||
.withFunctionName("add", AddEvaluator.class)
|
.withFunctionName("add", AddEvaluator.class)
|
||||||
.withFunctionName("and", AndEvaluator.class)
|
.withFunctionName("and", AndEvaluator.class)
|
||||||
;
|
;
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,11 +17,9 @@
|
||||||
package org.apache.solr.client.solrj.io.stream.eval;
|
package org.apache.solr.client.solrj.io.stream.eval;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
import org.apache.solr.client.solrj.io.Tuple;
|
import org.apache.solr.client.solrj.io.Tuple;
|
||||||
import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
|
||||||
|
@ -29,6 +27,8 @@ import org.apache.solr.client.solrj.io.eval.SubtractEvaluator;
|
||||||
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
public class SubtractEvaluatorTest extends LuceneTestCase {
|
public class SubtractEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
StreamFactory factory;
|
StreamFactory factory;
|
||||||
|
@ -39,7 +39,7 @@ public class SubtractEvaluatorTest extends LuceneTestCase {
|
||||||
|
|
||||||
factory = new StreamFactory()
|
factory = new StreamFactory()
|
||||||
.withFunctionName("sub", SubtractEvaluator.class);
|
.withFunctionName("sub", SubtractEvaluator.class);
|
||||||
values = new HashedMap();
|
values = new HashMap<String,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue