static void Main(string[] args) { if (!WordHelper.CheckInput(args)) { throw new Exception(String.Format("One or some of the words is too short")); } ; var amtElements = args.GetLength(0); if (amtElements > 10 || amtElements <= 0) { throw new Exception(String.Format("Incorrect word amount")); // negaliu leist useriui iš naujo įrašinėt žodžių nes console blogai nuskaito LT raides } //IWordRepository _wordRepository = new EFCFWordRepository(); //string[] myWords = args; //var object1 = new BusinessLogic.AnagramSolver(_wordRepository); //foreach (string s in object1.GetAnagrams(myWords)) //{ // System.Console.WriteLine("{0}", s); //yra using system bet doesn't work without it? //} }
public void Should_ReturnFalse_When_WordLessThanMinLetters() { var result = WordHelper.CheckInput(new string[] { "a", "b" }); Assert.AreEqual(result, false); }
public void Should_ReturnTrue_When_WordHasMinLetters() { var result = WordHelper.CheckInput(new string[] { "as", "tu" }); Assert.AreEqual(result, true); }