public void GetByCode_WhenNotExists_ReturnsNull()
        {
            var customEntityRepository = GetCustomEntityRepository();
            var entityDefinitions      = GetBaseEntityDefinitions();

            var repo   = new EntityDefinitionRepository(entityDefinitions, customEntityRepository);
            var result = repo.GetByCode("UNIQUE");

            result.Should().BeNull();
        }
        public void GetRequiredByCode_WhenExists_Returns(string definitionCode)
        {
            var customEntityRepository = GetCustomEntityRepository();
            var entityDefinitions      = GetBaseEntityDefinitions();

            var repo   = new EntityDefinitionRepository(entityDefinitions, customEntityRepository);
            var result = repo.GetByCode(definitionCode);

            result.EntityDefinitionCode.Should().Be(definitionCode);
        }
        public void GetByCode_WhenExists_Returns(string definitionCode)
        {
            var customEntityRepository = GetCustomEntityRepository();
            var entityDefinitions      = GetBaseEntityDefinitions();

            var repo   = new EntityDefinitionRepository(entityDefinitions, customEntityRepository);
            var result = repo.GetByCode(definitionCode);

            Assert.Equal(definitionCode, result.EntityDefinitionCode);
        }