public void Update_UnknownIndex_Throws() { var id = Factory.GetInteger().ToString(); Assert.Throws <InvalidOperationException>(() => _coreIndexer.Update(id, new { Foo = 42 }, "bad-index")); }
public void Update_CallsClientPut() { var id = Factory.GetInteger().ToString(); _coreIndexer.Update(id, new { Foo = 42 }, "my-index"); _fixture.ServiceLocationMock.HttpClientMock .Verify(m => m.Put(new Uri($"http://example.com/my-index/AnonymousType/{id}"), It.IsAny <byte[]>()), Times.Once); }