Esempio n. 1
0
        public void GetCachesByTerrainDifficultyTest( )
        {
            DataFilter filter = filterManager.GetDefaultFilter();

            filter.FromTerrainDifficulty = 4.9;

            IList <Cache> expected = new List <Cache>();

            expected.Add(new Cache {
                Id = 9
            });
            expected.Add(new Cache {
                Id = 64
            });
            expected.Add(new Cache {
                Id = 72
            });
            expected.Add(new Cache {
                Id = 80
            });
            expected.Add(new Cache {
                Id = 82
            });
            expected.Add(new Cache {
                Id = 89
            });
            expected.Add(new Cache {
                Id = 171
            });
            expected.Add(new Cache {
                Id = 299
            });
            expected.Add(new Cache {
                Id = 316
            });
            expected.Add(new Cache {
                Id = 413
            });

            IList <Cache> actual = target.GetCachesMatchingFilter(filter);

            Assert.AreEqual(expected.Count, actual.Count);

            foreach (Cache cache in expected)
            {
                Assert.IsTrue(actual.Contains(cache));
            }
        }
Esempio n. 2
0
 public DataFilter GetDefaultFilter()
 {
     return(filterManager.GetDefaultFilter());
 }