Esempio n. 1
0
        public void Constructor_Should_Throw_Exception_When_Region_Is_LessThan_Or_Equal_Zero(int value)
        {
            //Arrange
            var region        = new SchoolRegion(value);
            var schoolBuilder = _aSchool.But().With(region);

            //Act
            Action school = () => schoolBuilder.Build();

            //Assert
            school.Should().Throw <LessThanOrEqaulZeroValueException>();
        }
Esempio 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;
        }
Esempio n. 3
0
 public SchoolTestBuilder With(SchoolRegion region)
 {
     Region = region;
     return(this);
 }