lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/4] lucenenet git commit: Completed the BoostingQueryTest class
Date Wed, 12 Aug 2015 17:52:03 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 70ba377a8 -> 2808ec740


Completed the BoostingQueryTest class


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/96118654
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/96118654
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/96118654

Branch: refs/heads/master
Commit: 96118654a2a358af8fdfd13455964432820d898d
Parents: 70ba377
Author: Josh Sullivan <jaysche.sullivan@gmail.com>
Authored: Mon Aug 10 20:06:27 2015 -0400
Committer: Josh Sullivan <jaysche.sullivan@gmail.com>
Committed: Mon Aug 10 20:06:27 2015 -0400

----------------------------------------------------------------------
 .../BoostingQueryTest.cs                        | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96118654/src/Lucene.Net.Tests.Queries/BoostingQueryTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/BoostingQueryTest.cs b/src/Lucene.Net.Tests.Queries/BoostingQueryTest.cs
new file mode 100644
index 0000000..49c167a
--- /dev/null
+++ b/src/Lucene.Net.Tests.Queries/BoostingQueryTest.cs
@@ -0,0 +1,26 @@
+´╗┐using Lucene.Net.Index;
+using Lucene.Net.Queries;
+using Lucene.Net.Search;
+using Lucene.Net.Util;
+using NUnit.Framework;
+
+namespace Lucene.Net.Tests.Queries
+{
+    public class BoostingQueryTest : LuceneTestCase
+    {
+        // TODO: this suite desperately needs more tests!
+        // ... like ones that actually run the query
+
+        [Test]
+        public virtual void TestBoostingQueryEquals()
+        {
+            TermQuery q1 = new TermQuery(new Term("subject:", "java"));
+            TermQuery q2 = new TermQuery(new Term("subject:", "java"));
+            assertEquals("Two TermQueries with same attributes should be equal", q1, q2);
+            BoostingQuery bq1 = new BoostingQuery(q1, q2, 0.1f);
+            QueryUtils.Check(bq1);
+            BoostingQuery bq2 = new BoostingQuery(q1, q2, 0.1f);
+            assertEquals("BoostingQuery with same attributes is not equal", bq1, bq2);
+        }
+    }
+}
\ No newline at end of file


Mime
View raw message