Lucene.Net.QueryParsers.TestMultiFieldQueryParser.TestStaticMethod3 C# (CSharp) Method

TestStaticMethod3() private method

private TestStaticMethod3 ( ) : void
return void
		public virtual void  TestStaticMethod3()
		{
            var queries = new [] { "one", "two", "three" };
            var fields = new [] { "f1", "f2", "f3" };
            var flags = new [] { Occur.MUST, Occur.MUST_NOT, Occur.SHOULD };
            var q = MultiFieldQueryParser.Parse(Util.Version.LUCENE_CURRENT, queries, fields, flags, new StandardAnalyzer(Util.Version.LUCENE_CURRENT));
			Assert.AreEqual("+f1:one -f2:two f3:three", q.ToString());
			
            var flags2 = new[] { Occur.MUST };
			Assert.Throws<ArgumentException>(
			    () =>
			    MultiFieldQueryParser.Parse(Util.Version.LUCENE_CURRENT, queries, fields, flags2,
			                                new StandardAnalyzer(Util.Version.LUCENE_CURRENT)));
		}