本文整理汇总了C#中School.RemoveCourse方法的典型用法代码示例。如果您正苦于以下问题:C# School.RemoveCourse方法的具体用法?C# School.RemoveCourse怎么用?C# School.RemoveCourse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类School
的用法示例。
在下文中一共展示了School.RemoveCourse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemovedCourseShouldBeContainedInTheSchool
public void RemovedCourseShouldBeContainedInTheSchool()
{
var school = new School("Telerik");
var course = new Course("Math");
school.RemoveCourse(course);
}
示例2: RemoveNullCourse_RemoveNullCourseFromShool_ShouldThrowArgumentNullException
public void RemoveNullCourse_RemoveNullCourseFromShool_ShouldThrowArgumentNullException()
{
var school = new School("HR.Smirnenski");
Course course = null;
school.AddCourse(course);
school.RemoveCourse(course);
}
示例3: RemoveNonExistingCourseTest
public void RemoveNonExistingCourseTest()
{
List<Course> courses = new List<Course>();
School school = new School(courses);
Course javaScript = new Course("JavaScript");
school.RemoveCourse(javaScript);
}
示例4: RemoveCourse_ThrowsExceptionWhenParameterNull
public void RemoveCourse_ThrowsExceptionWhenParameterNull()
{
List<Course> courses = new List<Course>();
School school = new School(courses);
Course javascript = new Course("Javascript");
school.RemoveCourse(javascript);
}
示例5: SchoolShouldRemoveCourseCorrectly
public void SchoolShouldRemoveCourseCorrectly()
{
var school = new School("Telerik Academy By Progress");
var course = new Course("Unit Testing");
school.AddCourse(course);
school.RemoveCourse(course);
Assert.AreEqual(0, school.Courses.Count());
}
示例6: RemovingCourseShouldWorkCorrectly
public void RemovingCourseShouldWorkCorrectly()
{
var school = new School("Greendale");
var course = new Course("Grifting");
school.AddCourse(course);
school.RemoveCourse(course);
Assert.IsTrue(school.Courses.Count == 0);
}
示例7: Test_SchoolRemoveCoursetCorrectly
public void Test_SchoolRemoveCoursetCorrectly()
{
var school = new School("Telerik");
var course = new Course("Java Script");
school.AddCourse(course);
school.RemoveCourse(course);
Assert.AreEqual(0, school.Courses.Count);
}
示例8: SchoolShouldNotThrowAnExceptionWhenRemovingValidCourse
public void SchoolShouldNotThrowAnExceptionWhenRemovingValidCourse()
{
var school = new School("School");
var course = new Course("CSharp");
school.AddCourse(course);
school.RemoveCourse(course);
}
示例9: AddingCourseAndThanRemovingItShouldNotThrow
public void AddingCourseAndThanRemovingItShouldNotThrow()
{
School school = new School("Hogwards");
Course course = new Course("BatCourse");
school.AddCourse(course);
school.RemoveCourse(course);
}
示例10: SchoolShouldRemoveCourseCorrectly
public void SchoolShouldRemoveCourseCorrectly()
{
var school = new School("Telerik Academy");
var course = new Course("C#");
school.AddCourse(course);
school.RemoveCourse(course);
Assert.IsTrue(school.Courses.Count == 0);
}
示例11: School_RemovingCourses_CheckIfCorrect
public void School_RemovingCourses_CheckIfCorrect()
{
var school = new School();
var course = new Course();
school.AddCourse(course);
school.RemoveCourse(course);
Assert.AreEqual(0, school.NumberOfCourses);
}
示例12: RemovingNonExistingCourseShoudThrow
public void RemovingNonExistingCourseShoudThrow()
{
var school = new School();
var course = new Course();
var course1 = new Course();
school.AddCourse(course);
school.RemoveCourse(course1);
}
示例13: TestRemoveCourse1
public void TestRemoveCourse1()
{
School school = new School();
Course course = new Course("C#");
school.AddCourse(course);
school.RemoveCourse(course);
Assert.AreEqual(0, school.Courses.Count, "Couldn't remove the course.");
}
示例14: RemoveCourse_IsTrue
public void RemoveCourse_IsTrue()
{
List<Course> courses = new List<Course>();
School school = new School(courses);
Course html = new Course("HTML");
school.AddCourse(html);
school.RemoveCourse(html);
Assert.IsTrue(school.Courses.Count == 0);
}
示例15: TestRemoveNonExistingCourse
public void TestRemoveNonExistingCourse()
{
Course php = new Course("PHP");
Course js = new Course("Java Script");
School mySchool = new School();
mySchool.AddCourse(js);
mySchool.RemoveCourse(php);
}