Beispiel #1
0
        public IntersectionTest()
        {
            var           dataGenerator = IoC.Services.GetService <TestDataGenerator>();
            SoupGenerator generator     = dataGenerator.InitGenerator(allowedDirections: Directions.E | Directions.N);

            soup = generator.Init().Soup;
        }
Beispiel #2
0
        public void IsOverlappedRule()
        {
            var           dataGenerator = IoC.Services.GetService <TestDataGenerator>();
            SoupGenerator generator     = dataGenerator.InitGenerator(allowedDirections: Directions.E | Directions.N);
            Soup          soup          = generator.Init().Create();

            IRule rule = new NotOverlapped();

            //Test that all entries are overlapped
            foreach (WordEntry entry in soup.UsedWords.Values)
            {
                string testWord = entry.Name.Substring(0, Math.Min(entry.Name.Length, 3));
                Assert.False(rule.Check(soup, new WordEntry {
                    X = entry.X, Y = entry.Y, Direction = entry.Direction, Name = testWord
                }));
            }
        }