public static CoursesCounter Random() { var existingCourses = ListMother <CourseId> .Random(CourseIdMother.Random); return(Create( CoursesCounterIdMother.Random(), CoursesCounterTotalMother.Create(existingCourses.Count), existingCourses )); }
public static CoursesCounter Incrementing( CoursesCounter existingCounter, CourseId courseId) { var existingCourses = new List <CourseId>(existingCounter.ExistingCourses); existingCourses.Add(courseId); return(Create( existingCounter.Id, CoursesCounterTotalMother.Create(existingCounter.Total.Value + 1), existingCourses )); }