public void TestCreateNewEntity() { // Assert const string sql = "SELECT * FROM \"Customer\";"; const string entityName = "Customer"; Assert.IsNull(_service.Table); _service.GetMetaData(Conn, entityName, sql); Assert.IsNotNull(_service.Table); Assert.AreEqual(entityName, _service.Table.Name); Assert.IsTrue(_service.Table.Fields.Any()); // Act var result = _service.CreateNewEntity(); // Assert Assert.IsFalse(string.IsNullOrEmpty(result)); Debug.Print(result); }
public void TestCreateNewEntity() { // Assert Assert.IsNull(_service.Table); _service.GetMetaData(_conn, EntityName, Sql); Assert.IsNotNull(_service.Table); Assert.AreEqual(EntityName, _service.Table.Name); Assert.IsTrue(_service.Table.Fields.Any()); // Act var result = _service.CreateNewEntity(); // Assert Assert.IsFalse(string.IsNullOrEmpty(result)); Debug.Print(result); }