本文整理汇总了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);
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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.");
}
示例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");
}
示例9: RemovingStudenThatIsNullShouldThrow
public void RemovingStudenThatIsNullShouldThrow()
{
School school = new School("Hogwards");
school.RemoveStudent(null);
}
示例10: RemovingStudenThatDoesntExistShouldThrow
public void RemovingStudenThatDoesntExistShouldThrow()
{
School school = new School("Hogwards");
Student student = new Student("Stamat", 10000);
school.RemoveStudent(student);
}
示例11: RemoveNullStudent_RemoveANullStudentFromShool_ShouldThrowArgumentNullException
public void RemoveNullStudent_RemoveANullStudentFromShool_ShouldThrowArgumentNullException()
{
var school = new School("HR.Smirnenski");
Student student = null;
school.RemoveStudent(student);
}
示例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);
}
示例13: SchoolShouldThrowExceptionWhenRemovingNullStudent
public void SchoolShouldThrowExceptionWhenRemovingNullStudent()
{
var school = new School("Telerik Academy");
Student student = null;
school.RemoveStudent(student);
}
示例14: SchoolShouldThrownWhenRemovingStudentDoesntExist
public void SchoolShouldThrownWhenRemovingStudentDoesntExist()
{
var school = new School("Telerik");
var student = new Student("Gosho", 50000);
school.RemoveStudent(student);
}
示例15: SchoolShouldThrowExceptionOnUnexistingStudentRemoval
public void SchoolShouldThrowExceptionOnUnexistingStudentRemoval()
{
var school = new School("Telerik Academy By Progress");
Student student = new Student("Humpty Dumpty", 10000);
school.RemoveStudent(student);
}