public void TestWeight() { var options = IndexOptions <TestClass> .SetWeight(x => x.textfield, 2); string expected = "{ \"weights\" : { \"textfield\" : 2 } }"; Assert.Equal(expected, options.ToJson()); }
public void TestMultipleWeights() { var options = IndexOptions <TestClass> .SetWeight(x => x.textfield, 2).SetWeight(x => x.idioma, 10); string expected = "{ \"weights\" : { \"textfield\" : 2, \"idioma\" : 10 } }"; Assert.AreEqual(expected, options.ToJson()); }