public void Constructor_Should_Throw_Exception_When_Round_Is_LessThan_Or_Equal_Zero(int value) { //Arrange var round = new SchoolRound(value); var schoolBuilder = _aSchool.But().WithRound(round); //Act Action school = () => schoolBuilder.Build(); //Assert school.Should().Throw <LessThanOrEqaulZeroValueException>(); }
public School(SchoolId id, SchoolName name, SchoolCode code, SchoolRegion region, SchoolRound round, SchoolContactInfo contactInfo, int sex, string fields, int academicYear, HeadMaster headMaster, SchoolTypeId schoolType, SchoolTermId schoolTerm, int nature, string description, long studentsCount) : base(id) { Validate(name.Value, code.Value, region.Value, round.Value, academicYear, nature); Name = name; Code = code; Region = region; Round = round; Sex = sex; Fields = fields; AcademicYear = academicYear; HeadMaster = headMaster; SchoolType = schoolType; SchoolTerm = schoolTerm; Nature = nature; Description = description; StudentsCount = studentsCount; ContactInfo = contactInfo; }
public SchoolTestBuilder WithRound(SchoolRound round) { Round = round; return(this); }