Esempio n. 1
0
        public void TestExport()
        {
            // Assert
            const string sql = "SELECT * FROM \"Customer\";";

            const string entityName = "Customer";

            const string primaryKeyField = "CustomerId";

            const string targetPath = @"D:\temp";


            Assert.IsNull(_service.Table);

            _service.GetMetaData(Conn, entityName, sql, primaryKeyField);

            Assert.IsNotNull(_service.Table);

            Assert.AreEqual(entityName, _service.Table.Name);

            Assert.IsTrue(_service.Table.Fields.Any());

            // Act
            var result = _service.ExportAll(targetPath);

            // Assert
            Assert.IsTrue(result.Any());

            foreach (var fileName in result)
            {
                Debug.Print(fileName);
            }
        }
        public void TestExport()
        {
            // Assert
            Assert.IsNull(_service.Table);

            _service.GetMetaData(_conn, EntityName, Sql, PrimaryKeyField);

            Assert.IsNotNull(_service.Table);

            Assert.AreEqual(EntityName, _service.Table.Name);

            Assert.IsTrue(_service.Table.Fields.Any());

            // Act
            var result = _service.ExportAll(TargetPath);

            // Assert
            Assert.IsTrue(result.Any());

            foreach (var fileName in result)
            {
                Debug.Print(fileName);
            }
        }