當前位置: 首頁>>代碼示例>>C#>>正文


C# School.Course類代碼示例

本文整理匯總了C#中School.Course的典型用法代碼示例。如果您正苦於以下問題:C# Course類的具體用法?C# Course怎麽用?C# Course使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Course類屬於School命名空間,在下文中一共展示了Course類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CourseShouldAddStudent

 public void CourseShouldAddStudent()
 {
     var course = new Course("Maths");
     var student = new Student("unnamed", Student.MinValidId);
     student.JoinCourse(course);
     Assert.AreEqual(1, course.Students.Count);
 }
開發者ID:tddold,項目名稱:TelerikAcademy-5,代碼行數:7,代碼來源:CourseTests.cs

示例2: AddingTheSameCourseMoreThanOnce_ThrowException

 public void AddingTheSameCourseMoreThanOnce_ThrowException()
 {
     var school = new SchoolDem("Filipovo");
     var course = new Course("Alg");
     school.AddCourse(course);
     school.AddCourse(course);
 }
開發者ID:Bvaptsarov,項目名稱:Homework,代碼行數:7,代碼來源:SchoolTest.cs

示例3: CourseShouldThrowIfStudentAlreadyAdded

 public void CourseShouldThrowIfStudentAlreadyAdded()
 {
     var course = new Course("Maths");
     var student = new Student("unnamed", Student.MinValidId);
     student.JoinCourse(course);
     student.JoinCourse(course);
 }
開發者ID:tddold,項目名稱:TelerikAcademy-5,代碼行數:7,代碼來源:CourseTests.cs

示例4: TestRemoveNotExistingStudent

        public void TestRemoveNotExistingStudent()
        {
            Course css = new Course("CSS", students);
            Student koko = new Student("Kaloyan", 88823);

            css.RemoveStudent(koko);
        }
開發者ID:VyaraGGeorgieva,項目名稱:TelerikAcademy,代碼行數:7,代碼來源:CourseTest.cs

示例5: CourseCanNotRemoveAStudentThatItDoesntHave

        public void CourseCanNotRemoveAStudentThatItDoesntHave()
        {
            var course = new Course("math");
            var student = new Student("Pesho", 12345);

            course.RemoveStudent(student);
        }
開發者ID:,項目名稱:,代碼行數:7,代碼來源:

示例6: TestJoinCourseSuccessfully

 public void TestJoinCourseSuccessfully()
 {
     Course course = new Course();
     Student student = new Student("Valia", 34567);
     string result = course.JoinCourse(student);
     Assert.AreEqual("Done!", result);
 }
開發者ID:polinaak,項目名稱:Polina-Telerik-Academy,代碼行數:7,代碼來源:CourseTest.cs

示例7: AddStudentTwiseTest

 public void AddStudentTwiseTest()
 {
     Course course = new Course("Math");
     Student student = new Student("Gosho", "Ivanov", 12345);
     course.AddStudent(student);
     course.AddStudent(student);
 }
開發者ID:GStoykov,項目名稱:TelerikAcademyHomeworks,代碼行數:7,代碼來源:CourseTest.cs

示例8: AddStudentAtsCourseMethodTest

 public void AddStudentAtsCourseMethodTest()
 {
     Course course = new Course("Math");
     Student student = new Student("Gosho", "Ivanov", 12345);
     course.AddStudent(student);
     Assert.AreEqual(student.ID, course.ListOfStudents[0].ID);
 }
開發者ID:GStoykov,項目名稱:TelerikAcademyHomeworks,代碼行數:7,代碼來源:CourseTest.cs

示例9: StudentGroupShouldAddCourse

 public void StudentGroupShouldAddCourse()
 {
     var myClass = new StudentGroup("TelerikAcad");
     var course = new Course("HQC");
     myClass.AddCourse(course);
     Assert.AreEqual(1, myClass.Courses.Count);
 }
開發者ID:tddold,項目名稱:TelerikAcademy-5,代碼行數:7,代碼來源:SchoolTests.cs

示例10: TestCourseWithZeroStudents

        public void TestCourseWithZeroStudents()
        {
            List<Student> students = new List<Student>();

            Course newCourse = new Course(students);
            Assert.AreEqual(0, newCourse.StudentsInCourse.Count);
        }
開發者ID:VDGone,項目名稱:TelerikAcademy-2,代碼行數:7,代碼來源:TestCourse.cs

示例11: AddingTheSameStudentMoreThanOnce_ThrowException

 public void AddingTheSameStudentMoreThanOnce_ThrowException()
 {
     var spirt = new Course("Spirt");
     var student = new Student("Peter");
     spirt.AddStudent(student);
     spirt.AddStudent(student);
 }
開發者ID:Bvaptsarov,項目名稱:Homework,代碼行數:7,代碼來源:CourseTest.cs

示例12: NameTest

 public void NameTest()
 {
     string name = "JavaScript";
     Course target = new Course(name);
     string actual = target.Name;
     Assert.AreEqual(name, actual);
 }
開發者ID:smihaylovit,項目名稱:TelerikAkademy,代碼行數:7,代碼來源:CourseTest.cs

示例13: ValidateCourse

 void ValidateCourse(Course course)
 {
     if (course == null)
     {
         throw new ArgumentNullException("This course is missed.");
     }
 }
開發者ID:deskuuu,項目名稱:TelerikAcademy,代碼行數:7,代碼來源:Student.cs

示例14: RemoveStudentInCourse

 public void RemoveStudentInCourse()
 {
     Course course = new Course("lala");
     course.AddStudent(new Student("lol", 10000));
     course.RemoveStudentByUID(10000);
     course.AddStudent(new Student("lol", 10000));
 }
開發者ID:Dyno1990,項目名稱:TelerikAcademy-1,代碼行數:7,代碼來源:CourseTests.cs

示例15: StudentShouldNotThrowWhenLeavingCourse

 public void StudentShouldNotThrowWhenLeavingCourse()
 {
     var course = new Course("testCourse");
     var st = new Student("Pesho", 15000);
     st.JoinCourse(course);
     st.LeaveCourse(course);
 }
開發者ID:tddold,項目名稱:TelerikAcademy-5,代碼行數:7,代碼來源:StudentTests.cs


注:本文中的School.Course類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。