public void TableNameNull()
        {
            var entityPropertyCollection = CreateEntityPropertyCollection();

            entityPropertyCollection.TableName = null;
            var command = PriceNetSqlGenerator.GenerateInsertCommand(entityPropertyCollection);
        }
        public void CanInsertOwnSite()
        {
            var entityPropertyCollection = OwnSiteProperties.Get();
            var command = PriceNetSqlGenerator.GenerateInsertCommand(entityPropertyCollection);

            ParseSql(command.CommandText);
            TestCommand(command);
        }
        public void CanInsertCompetitorProduct()
        {
            var propertyCollection = CompetitorProductProperties.Get();
            var command            = PriceNetSqlGenerator.GenerateInsertCommand(propertyCollection);

            ParseSql(command.CommandText);
            TestCommand(command);
        }
        public void CanGeneratePriceNetInsert()
        {
            var entityPropertyCollection = CreateEntityPropertyCollection();

            entityPropertyCollection.Properties = new[] { CreateNameProperty(), CreateImportCodeProperty() };
            var command = PriceNetSqlGenerator.GenerateInsertCommand(entityPropertyCollection);

            Assert.IsFalse(string.IsNullOrEmpty(command.CommandText));
        }
        public void ValidSqlInsertGenerated()
        {
            var entityPropertyCollection = CreateEntityPropertyCollection();

            entityPropertyCollection.Properties = new[] { CreateNameProperty(), CreateImportCodeProperty() };
            entityPropertyCollection.PrimaryEntityColumnName = null;
            entityPropertyCollection.PrimaryEntityIds        = null;
            entityPropertyCollection.PrimaryEntityTableName  = null;
            var           command = PriceNetSqlGenerator.GenerateInsertCommand(entityPropertyCollection);
            TSql100Parser parser  = new TSql100Parser(false);

            parser.Parse(new StringReader(command.CommandText), out IList <ParseError> errors);

            Assert.IsFalse(errors.Any());
        }