Esempio n. 1
0
        public static void Main(string[] args)
        {
            var report = new Report();

            report.AddCourse(new Course("Patrones de diseño", 1000, 5));
            report.AddCourse(new Course("Flutter", 1900, 4.5));

            string reportContent = report.ToString();

            Console.WriteLine(reportContent);

            var fileOperations = new FileOperations();

            fileOperations.SaveToFile(@"Reports", "WorkReport.txt", reportContent);
        }
        public void TestAddCourse_TwoCourses_2CoursesAddedToReportList()
        {
            report = new Report();

            Assert.AreEqual(0, report.Courses.Count);

            foreach (var course in courses)
            {
                report.AddCourse(course);
            }

            Assert.AreEqual(2, report.Courses.Count);
        }