public void TestCreateEntityServiceClass() { // Assert const string sql = "SELECT * FROM \"Customer\";"; const string entityName = "Customer"; const string primaryKeyField = "CustomerId"; 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.CreateEntityServiceClass(); // Assert Assert.IsFalse(string.IsNullOrEmpty(result)); Debug.Print(result); }
public void TestCreateEntityServiceClass() { // 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.CreateEntityServiceClass(); // Assert Assert.IsFalse(string.IsNullOrEmpty(result)); Debug.Print(result); }