public void ShouldMapLocationToLocationListItemModel()
        {
            var entity = new LocationBuilder().Build();
            var model = new LocationToLocationListItemModelMapper().Build(entity);

            model.Classroom.ShouldBe(entity.ClassroomIdentificationCode);
        }
Ejemplo n.º 2
0
        public void ShouldHaveErrorsWhenLocationExists()
        {
            Setup();
            var locationEntity = new LocationBuilder().Build();

            _genericRepository
                .Get(Arg.Any<Expression<Func<Web.Data.Entities.Location, bool>>>())
                .Returns(locationEntity);

            _validator.ShouldHaveValidationErrorFor(m => m.ClassroomIdentificationCode, _locationCreateModel.ClassroomIdentificationCode);
        }