当前位置: 首页>>代码示例>>C#>>正文


C# Course.RemoveStudent方法代码示例

本文整理汇总了C#中Course.RemoveStudent方法的典型用法代码示例。如果您正苦于以下问题:C# Course.RemoveStudent方法的具体用法?C# Course.RemoveStudent怎么用?C# Course.RemoveStudent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Course的用法示例。


在下文中一共展示了Course.RemoveStudent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StudentIsNotContainInCourse

        public void StudentIsNotContainInCourse()
        {
            string name = "Pesho";
            int uniqueNumber = 10000;
            var pesho = new Student(name, uniqueNumber);

            string nameOfCourse = "JavaScript";
            Course javaScript = new Course(nameOfCourse);

            javaScript.AddStudent(pesho);
            javaScript.RemoveStudent(pesho);
            javaScript.RemoveStudent(pesho);
        }
开发者ID:jerko0,项目名称:Telerik-Academy,代码行数:13,代码来源:TestSchool.cs

示例2: TestToGiveWrongStudentNumberInRemoveStudentMethod

        public void TestToGiveWrongStudentNumberInRemoveStudentMethod()
        {
            Course html = new Course("HTML");
            int notExpected = html.SetOfStudents.Count;

            html.RemoveStudent(10003);
        }
开发者ID:nim-ohtar,项目名称:TelerikAcademy-2,代码行数:7,代码来源:CourseTest.cs

示例3: CourseShouldRemoveStudentCorrectly

 public void CourseShouldRemoveStudentCorrectly()
 {
     var course = new Course("HQC");
     var student = new Student("Nikolay Kostov", 10000);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count);
 }
开发者ID:b-slavov,项目名称:Telerik-Software-Academy,代码行数:8,代码来源:CourseTests.cs

示例4: CourseShouldRemoveStudentCorrectly

 public void CourseShouldRemoveStudentCorrectly()
 {
     var course = new Course("HTML");
     var student = new Student("Pesho", 22222);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count);
 }
开发者ID:kiko81,项目名称:Teleric-Academy-Homeworks,代码行数:8,代码来源:SchoolTests.cs

示例5: CourseShouldThrowExceptionWhenRemoveUnexistingStudent

        public void CourseShouldThrowExceptionWhenRemoveUnexistingStudent()
        {
            var course = new Course("C# OOP");

            var student = new Student("Pesho Peshov");

            course.RemoveStudent(student);
        }
开发者ID:NikitoG,项目名称:TelerikAcademyHomeworks,代码行数:8,代码来源:CourseTests.cs

示例6: CourseShouldNotThrowAnExceptionWhenRemovingValidStudent

        public void CourseShouldNotThrowAnExceptionWhenRemovingValidStudent()
        {
            var course = new Course("CSharp");
            var student = new Student("Georgi", "Georgiev", 10001);

            course.AddStudent(student);
            course.RemoveStudent(student);
        }
开发者ID:AYankova,项目名称:HQC,代码行数:8,代码来源:CourseTests.cs

示例7: RemoveStudentShouldRemoveHimFromCourse

 public void RemoveStudentShouldRemoveHimFromCourse()
 {
     var course = new Course("asdad");
     var student = new Student("Jigubigulq", 12312);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count, "Course is not adding students properly!");
 }
开发者ID:NK-Hertz,项目名称:Telerik-Academy-2015,代码行数:8,代码来源:StudentAndCoursesTests.cs

示例8: CourseShouldRemoveStudentCorrectly

 public void CourseShouldRemoveStudentCorrectly()
 {
     var course = new Course("Test Course");
     var student = new Student("Jane Dow", 99999);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count);
 }
开发者ID:Vyara,项目名称:Telerik-High-Quality-Code-Homeworks,代码行数:8,代码来源:CourseTest.cs

示例9: CourseShouldRemoveStudentCorrectly

 public void CourseShouldRemoveStudentCorrectly()
 {
     var course = new Course("Counting");
     var student = new Student("Petyrcho", 88282);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count);
 }
开发者ID:mpenchev86,项目名称:Telerik-Academy,代码行数:8,代码来源:CourseTests.cs

示例10: Test_Course_RemoveStudent

 public void Test_Course_RemoveStudent()
 {
     Course course = new Course(nameMath);
     Student student = new Student("Nikodim", 77777);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count);
 }
开发者ID:Hri100v,项目名称:Telerik-Academy,代码行数:8,代码来源:CourseTest.cs

示例11: CourseShouldRemoveStudentCorrectly

 public void CourseShouldRemoveStudentCorrectly()
 {
     var course = new Course("Unit Testing");
     var student = new Student("Humpty Dumpty", 10000);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count());
 }
开发者ID:studware,项目名称:Ange-Git,代码行数:8,代码来源:CourseTests.cs

示例12: CourseShouldRemoveStudentCorrectly

 public void CourseShouldRemoveStudentCorrectly()
 {
     var course = new Course("C#");
     var student = new Student("John", "Doe", 12345);
     course.AddStudent(student);
     course.RemoveStudent(student);
     Assert.AreEqual(0, course.Students.Count);
 }
开发者ID:MarinaGeorgieva,项目名称:TelerikAcademy,代码行数:8,代码来源:CourseTests.cs

示例13: Course_RemoveStudentExceptionTest

 public void Course_RemoveStudentExceptionTest()
 {
     Student firstTestStudent = new Student("Pesho", 11111);
     Student secondTestStudent = new Student("Pesho", 12345);
     Course testCourse = new Course("CSharp");
     testCourse.AddStudent(firstTestStudent);
     testCourse.RemoveStudent(secondTestStudent);
 }
开发者ID:kris4o1993,项目名称:Telerik-Academy,代码行数:8,代码来源:CourseTest.cs

示例14: Course_RemoveStudentTest

 public void Course_RemoveStudentTest()
 {
     Student testStudent = new Student("Pesho", 11111);
     Course testCourse = new Course("CSharp");
     testCourse.AddStudent(testStudent);
     testCourse.RemoveStudent(testStudent);
     Assert.AreEqual(0, testCourse.Students.Count);
 }
开发者ID:kris4o1993,项目名称:Telerik-Academy,代码行数:8,代码来源:CourseTest.cs

示例15: RemoveStudent_RemoveANewStudentInCourse_ShouldRemoveStudentCorrectly

        public void RemoveStudent_RemoveANewStudentInCourse_ShouldRemoveStudentCorrectly()
        {
            var course = new Course();
            var student = new Student("Anna Mariq", 9);
            course.AddStudent(student);
            course.RemoveStudent(student);

            Assert.AreEqual(0, course.Students.Count);
        }
开发者ID:deskuuu,项目名称:TelerikAcademy,代码行数:9,代码来源:CourseTests.cs


注:本文中的Course.RemoveStudent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。