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


C# School.RemoveStudent方法代码示例

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


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

示例1: SchoolRemoveMissingStudenThrowException

 public void SchoolRemoveMissingStudenThrowException()
 {
     var student = new Student(" sd", 10000);
     var school = new School();
     var course = new Course();
     school.AddCourse(course);
     school.RemoveStudent(course, student);
 }
开发者ID:Varbanov,项目名称:TelerikAcademy,代码行数:8,代码来源:UnitTestingTests.cs

示例2: SchoolShouldRemoveStudentCorrectly

 public void SchoolShouldRemoveStudentCorrectly()
 {
     var school = new School("Telerik Academy By Progress");
     var student = new Student("Humpty Dumpty", 10000);
     school.AddStudent(student);
     school.RemoveStudent(student);
     Assert.AreEqual(0, school.Students.Count());
 }
开发者ID:studware,项目名称:Ange-Git,代码行数:8,代码来源:SchoolTests.cs

示例3: SchoolShouldRemoveStudentCorrectly

 public void SchoolShouldRemoveStudentCorrectly()
 {
     var school = new School("Yane Sandanski");
     var student = new Student("Jimmy Hendrix", 10000);
     school.AddStudent(student);
     school.RemoveStudent(student);
     Assert.IsTrue(school.Students.Count == 0);
 }
开发者ID:ivanvasilev,项目名称:Telerik-Academy-Homeworks,代码行数:8,代码来源:SchoolTest.cs

示例4: Test_SchoolRemoveStudentCorrectly

 public void Test_SchoolRemoveStudentCorrectly()
 {
     var school = new School("Telerik");
     var student = new Student("Tom Jordan", 55555);
     school.AddStudent(student);
     school.RemoveStudent(student);
     Assert.AreEqual(0, school.Students.Count);
 }
开发者ID:alexizvely,项目名称:Telerik-Academy-2015,代码行数:8,代码来源:SchoolTests.cs

示例5: SchoolShouldRemoveStudentCorrectly

 public void SchoolShouldRemoveStudentCorrectly()
 {
     var school = new School("Telerik Academy");
     var student = new Student("John", "Doe", 12345);
     school.AddStudent(student);
     school.RemoveStudent(student);
     Assert.IsTrue(school.Students.Count == 0);
 }
开发者ID:MarinaGeorgieva,项目名称:TelerikAcademy,代码行数:8,代码来源:SchoolTests.cs

示例6: SchoolShouldContainNoStudentsWhenTheOnlyStudentHasBeenDeleted

        public void SchoolShouldContainNoStudentsWhenTheOnlyStudentHasBeenDeleted()
        {
            var school = new School("School");
            Student student = new Student("Georgi", "Georgiev", 10001);

            school.AddStudent(student);
            school.RemoveStudent(student);

            Assert.AreEqual(0, school.Students.Count);
        }
开发者ID:AYankova,项目名称:HQC,代码行数:10,代码来源:SchoolTests.cs

示例7: SchoolShouldRemoveStudentsCorrectly

        public void SchoolShouldRemoveStudentsCorrectly()
        {
            School telerikAcademy = new School("TelerikAcademy");
            Student gosho = new Student(10000, "Georgi", "Petrov");

            telerikAcademy.AddStudent(gosho);
            telerikAcademy.RemoveStudent(gosho);

            Assert.AreEqual(0, telerikAcademy.Students.Count, "Adding a student and then removing it should result in the same list size.");
        }
开发者ID:atanas-georgiev,项目名称:TelerikAcademy-1,代码行数:10,代码来源:SchoolTests.cs

示例8: School_Remove_Student

        public void School_Remove_Student()
        {
            var school = new School(TestSchoolName);
            var student = new Student("Ivan Ivanov");

            school.AddStudent(student);
            school.RemoveStudent(student);

            Assert.AreEqual(0, school.NumberOfStudents(), "Can't remove Student from School");
        }
开发者ID:deyantodorov,项目名称:TelerikAcademy,代码行数:10,代码来源:SchoolTests.cs

示例9: RemovingStudenThatIsNullShouldThrow

 public void RemovingStudenThatIsNullShouldThrow()
 {
     School school = new School("Hogwards");
     school.RemoveStudent(null);
 }
开发者ID:Rostech,项目名称:TelerikAcademyHomeworks,代码行数:5,代码来源:SchoolTests.cs

示例10: RemovingStudenThatDoesntExistShouldThrow

        public void RemovingStudenThatDoesntExistShouldThrow()
        {
            School school = new School("Hogwards");
            Student student = new Student("Stamat", 10000);

            school.RemoveStudent(student);
        }
开发者ID:Rostech,项目名称:TelerikAcademyHomeworks,代码行数:7,代码来源:SchoolTests.cs

示例11: RemoveNullStudent_RemoveANullStudentFromShool_ShouldThrowArgumentNullException

 public void RemoveNullStudent_RemoveANullStudentFromShool_ShouldThrowArgumentNullException()
 {
     var school = new School("HR.Smirnenski");
     Student student = null;
     school.RemoveStudent(student);
 }
开发者ID:deskuuu,项目名称:TelerikAcademy,代码行数:6,代码来源:ShoolTests.cs

示例12: RemoveMissedStudent_RemoveMissedStudentStudentFromShool_ShouldThrowNullException

 public void RemoveMissedStudent_RemoveMissedStudentStudentFromShool_ShouldThrowNullException()
 {
     var school = new School("HR.Smirnenski");
     var student = new Student("Anna Mariq", 9);
     school.RemoveStudent(student);
 }
开发者ID:deskuuu,项目名称:TelerikAcademy,代码行数:6,代码来源:ShoolTests.cs

示例13: SchoolShouldThrowExceptionWhenRemovingNullStudent

 public void SchoolShouldThrowExceptionWhenRemovingNullStudent()
 {
     var school = new School("Telerik Academy");
     Student student = null;
     school.RemoveStudent(student);
 }
开发者ID:MarinaGeorgieva,项目名称:TelerikAcademy,代码行数:6,代码来源:SchoolTests.cs

示例14: SchoolShouldThrownWhenRemovingStudentDoesntExist

        public void SchoolShouldThrownWhenRemovingStudentDoesntExist()
        {
            var school = new School("Telerik");
            var student = new Student("Gosho", 50000);

            school.RemoveStudent(student);
        }
开发者ID:DimitarGaydardzhiev,项目名称:TelerikAcademy,代码行数:7,代码来源:SchoolTests.cs

示例15: SchoolShouldThrowExceptionOnUnexistingStudentRemoval

 public void SchoolShouldThrowExceptionOnUnexistingStudentRemoval()
 {
     var school = new School("Telerik Academy By Progress");
     Student student = new Student("Humpty Dumpty", 10000);
     school.RemoveStudent(student);
 }
开发者ID:studware,项目名称:Ange-Git,代码行数:6,代码来源:SchoolTests.cs


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