コード例 #1
0
        public void ClearingBoostsWillReturnDefaultValues()
        {
            Dictionary <string, float> boosts = new Dictionary <string, float>();

            boosts.Add("One", 1.1f);
            boosts.Add("Two", 9.1f);

            SearchOptions options = new SearchOptions("Test", "One,Two", 1000, boosts);

            Assert.AreEqual(2, options.Boosts.Count);
            Assert.AreEqual(1.1f, options.Boosts["One"]);
            Assert.AreEqual(9.1f, options.Boosts["Two"]);

            options.ClearBoosts();

            Assert.AreEqual(2, options.Boosts.Count);
            Assert.AreEqual(1, options.Boosts["One"]);
            Assert.AreEqual(1, options.Boosts["Two"]);
        }