Ejemplo n.º 1
0
        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>();
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public SchoolTestBuilder WithRound(SchoolRound round)
 {
     Round = round;
     return(this);
 }