本文整理汇总了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);
}
示例2: TestToGiveWrongStudentNumberInRemoveStudentMethod
public void TestToGiveWrongStudentNumberInRemoveStudentMethod()
{
Course html = new Course("HTML");
int notExpected = html.SetOfStudents.Count;
html.RemoveStudent(10003);
}
示例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);
}
示例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);
}
示例5: CourseShouldThrowExceptionWhenRemoveUnexistingStudent
public void CourseShouldThrowExceptionWhenRemoveUnexistingStudent()
{
var course = new Course("C# OOP");
var student = new Student("Pesho Peshov");
course.RemoveStudent(student);
}
示例6: CourseShouldNotThrowAnExceptionWhenRemovingValidStudent
public void CourseShouldNotThrowAnExceptionWhenRemovingValidStudent()
{
var course = new Course("CSharp");
var student = new Student("Georgi", "Georgiev", 10001);
course.AddStudent(student);
course.RemoveStudent(student);
}
示例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!");
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}