Ejemplo n.º 1
0
 public void When_using_Search_overload_with_fields()
 {
     var index = new Index();
     index.TankTopClient = Substitute.For<ITankTopClient>();
     var query = new Query("value").WithSearchFields("field1", "field2");
     index.Search(query);
     query.QueryText.Should().Be("field1:value OR field2:value");
 }
Ejemplo n.º 2
0
 protected void TestFixtureSetUp()
 {
     while (!Index.Started)
     {
         Thread.Sleep(1000);
         Index = TankTopClient.GetIndex("TankTop");
     }
     Index.DeleteDocuments(new Query("key:v*"));
 }
 public void Then_mock_ITankTopClient()
 {
     var mockTankTopClient = Substitute.For<ITankTopClient>();
     var myIndex = new Index { Name = "MyIndex", TankTopClient = mockTankTopClient };
     var document = new Document("id").AddField("key", "value");
     myIndex.AddDocument(document);
     mockTankTopClient.Received().AddDocument("MyIndex", document);
 }
 public void TestFixtureSetUp()
 {
     tankTopClient = new TankTopClient("http://:[email protected]");
     index = tankTopClient.CreateIndex("Stock");
     while (!index.Started)
     {
         Thread.Sleep(1000);
         index = tankTopClient.GetIndex("Stock");
     }
 }
Ejemplo n.º 5
0
 public void SetUp()
 {
     Index = TankTopClient.CreateIndex("TankTop", true);
     DeleteIndex();
 }