public void Export_ReturnsValidJson() { var query = new StringQuery("description:water and some other stuff"); var expected = JsonConvert.SerializeObject(new { query = "description:water and some other stuff" }, Formatting.None); Assert.AreEqual(expected, query.Export().ToString(Formatting.None)); }
public void Boost_WhenBoostIsLessThanZero_ThrowsArgumentOutOfRangeException() { var query = new StringQuery("description:water and some other stuff"); Assert.Throws<ArgumentOutOfRangeException>(() => query.Boost(-.1)); }
public void Boost_ReturnsStringQuery() { var query = new StringQuery("description:water and some other stuff").Boost(2.2); Assert.IsInstanceOf<StringQuery> (query); }