Example #1
0
        public void GetAllPathAsyncTestR2()
        {
            // arrange
            Program.path = "C:\\Test";
            string        mainPuth   = "C:\\Test";
            bool          r1         = false;
            bool          r2         = true;
            List <string> resultList = new List <string>();

            resultList.Add("1tseT\\");
            resultList.Add("2tseT\\");
            resultList.Add("3tseT\\2tseT\\");
            PathParser pp = new PathParser();

            // act
            pp.GetAllPathAsync(mainPuth, r1, r2).GetAwaiter().GetResult();
            var actual = pp.Result;

            // assert
            for (int i = 0; i < actual.Count; i++)
            {
                Assert.AreEqual(resultList[i], actual[i]);
            }
        }