Esempio n. 1
0
        public void characSumTest2()
        {
            string    text      = @"bbbbbbbb";
            CountChar countChar = new CountChar();

            countChar.characSum(text);
            Assert.AreEqual(countChar.characSum(text), 8);
        }
Esempio n. 2
0
        public void characSumTest()
        {
            string    text      = @"Love is more than a word,
                                 it says so much.
                                When I see these four letters,
                                I almost feel your touch.
                                This is only happened since,
                                I fell in love with you.
                                Why this word does this,
                                I haven't got a clue.";
            string    test      = @"There once was a young horse named Mary
                               This Mary was rather quite hairy1
                               She blow-dried her hair
                               And now she's quite bare
                               Now she has less hair to carry!";
            CountChar countChar = new CountChar();

            countChar.characSum(text);
            countChar.characSum(test);
            Assert.AreEqual(countChar.characSum(text), 432);
            Assert.AreEqual(countChar.characSum(test), 282);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Select task of Exercise:");
            Console.WriteLine("1. CountChar:");
            Console.WriteLine("2. MinerTest:");
            Console.WriteLine("3. LegendaryFarming:");
            Console.WriteLine("4. Orders:");
            Console.WriteLine("5. SoftUniParking:");
            Console.WriteLine("6. Cources:");
            Console.WriteLine("7. StudentAcademy:");
            Console.WriteLine("8. CompanyUser:"******"9. ForceBook:");
            Console.WriteLine("10. Exam:");

            CountChar        countChar        = new CountChar();
            MinerTast        minerTast        = new MinerTast();
            LegendaryFarming legendaryFarming = new LegendaryFarming();
            Orders           orders           = new Orders();
            SoftUniParking   softUniParking   = new SoftUniParking();
            Courses          courses          = new Courses();
            StudentAcademy   studentAcademy   = new StudentAcademy();
            CompanyUser      companyUser      = new CompanyUser();
            ForceBook        forceBook        = new ForceBook();
            SoftUniExam      softUniExam      = new SoftUniExam();

            int switch_on = int.Parse(Console.ReadLine());

            switch (switch_on)
            {
            case 1:
            {
                countChar.TaskCountChar();
                break;
            }

            case 2:
            {
                minerTast.TaskMinerTast();
                break;
            }

            case 3:
            {
                legendaryFarming.TsakLegendaryFarming();
                break;
            }

            case 4:
            {
                orders.TaskOrders();
                break;
            }

            case 5:
            {
                softUniParking.TaskSoftUniParking();
                break;
            }

            case 6:
            {
                courses.TaskCourses();
                break;
            }

            case 7:
            {
                studentAcademy.TaskStudentAcademy();
                break;
            }

            case 8:
            {
                companyUser.TaskCompanyUser();
                break;
            }

            case 9:
            {
                forceBook.TaskForceBook();
                break;
            }

            case 10:
            {
                softUniExam.TaskSoftUniExam();
                break;
            }

            default:
                Console.WriteLine("Exit:");
                break;
            }
        }