Esempio n. 1
0
        public void IsAlienSorted(string[] words, string order, bool expected)
        {
            var sut    = new VerifyingAnAlienDictionary();
            var actual = sut.IsAlienSorted(words, order);

            Assert.AreEqual(expected, actual);
        }
        public void VerifyingAnAlienDictionaryTest()
        {
            var solution = new VerifyingAnAlienDictionary();

            Assert.True(solution.IsAlienSorted(new string[] { "hello", "leetcode" }, "hlabcdefgijkmnopqrstuvwxyz"));
            Assert.False(solution.IsAlienSorted(new string[] { "word", "world", "row" }, "worldabcefghijkmnpqstuvxyz"));
            Assert.False(solution.IsAlienSorted(new string[] { "apple", "app" }, "abcdefghijklmnopqrstuvwxyz"));
            Assert.True(solution.IsAlienSorted(new string[] { "apple" }, "abcdefghijklmnopqrstuvwxyz"));
        }
 public void BeforeEach()
 {
     VerifyingAnAlienDictionary = new VerifyingAnAlienDictionary();
 }