public void ShouldThrowNotImplementedExceptionForUnknownEntityType()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create("LocationBlah", this.GetLocationsXmlFile(), false);

            // Then
        }
Example #2
0
        public void ShouldThrowNotImplementedExceptionForUnknownEntityType()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create("LocationBlah", this.GetLocationsXmlFile(), false);

            // Then
        }
        public void ShouldReturnValidLoaderBasedOnTypeOfEntity()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create("Location", this.GetLocationsXmlFile(), false);

            // Then
            loader.Should().Not.Be.Null();
            loader.GetType().Should().Be(typeof(LocationLoader));
        }
        public void ShouldRaiseErrorWhenEntityNameIsNullOrEmpty()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create(string.Empty, @"<abc></abc>", false);

            // Then
            loader.Should().Be.Null();
            this.logger.Error.Should().Contain("Entity name is either null or empty string.");
        }
        public void ShouldRaiseErrorWhenEntitiesXMlIsNullOrEmpty()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create("abc", string.Empty, false);

            // Then
            loader.Should().Be.Null();
            this.logger.Error.Should().Contain("Invalid entities xml");
        }
Example #6
0
        public void ShouldReturnValidLoaderBasedOnTypeOfEntity()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create("Location", this.GetLocationsXmlFile(), false);

            // Then
            loader.Should().Not.Be.Null();
            loader.GetType().Should().Be(typeof(LocationLoader));
        }
Example #7
0
        public void ShouldRaiseErrorWhenEntitiesXMlIsNullOrEmpty()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create("abc", string.Empty, false);

            // Then
            loader.Should().Be.Null();
            this.logger.Error.Should().Contain("Invalid entities xml");
        }
Example #8
0
        public void ShouldRaiseErrorWhenEntityNameIsNullOrEmpty()
        {
            // Given
            ICreateMDMLoader loaderFactory = new MDMLoaderFactory();

            // When
            var loader = loaderFactory.Create(string.Empty, @"<abc></abc>", false);

            // Then
            loader.Should().Be.Null();
            this.logger.Error.Should().Contain("Entity name is either null or empty string.");
        }