public void HasGetSet() { const string value = EstablishmentCategoryCode.Govt; var entity = new EstablishmentType { CategoryCode = value }; entity.ShouldNotBeNull(); entity.CategoryCode.ShouldEqual(value); }
public void HasGetSet() { const string value = "value"; var entity = new EstablishmentType { EnglishPluralName = value }; entity.ShouldNotBeNull(); entity.EnglishPluralName.ShouldEqual(value); }
public void Handle(CreateEstablishmentType command) { if (command == null) { throw new ArgumentNullException("command"); } if (string.IsNullOrWhiteSpace(command.PluralEnglishName)) { const int pluralNumber = 2; var template = string.Format("{{{0}}}", command.EnglishName); // ReSharper disable PossiblyMistakenUseOfParamsMethod command.PluralEnglishName = Pluralizer.Instance.Pluralize(template, pluralNumber); // ReSharper restore PossiblyMistakenUseOfParamsMethod } var category = _entities.FindByPrimaryKey <EstablishmentCategory>(command.CategoryCode); var entity = new EstablishmentType { CategoryCode = category.Code, EnglishName = command.EnglishName.Replace(" Or ", " or "), EnglishPluralName = command.PluralEnglishName, }; _entities.Create(entity); }
public void HasGetSet() { const string value = "value"; var entity = new EstablishmentType { EnglishPluralName = value }; entity.ShouldNotBeNull(); entity.EnglishPluralName.ShouldEqual(value); }
public void HasGetSet() { const string value = EstablishmentCategoryCode.Govt; var entity = new EstablishmentType { CategoryCode = value }; entity.ShouldNotBeNull(); entity.CategoryCode.ShouldEqual(value); }