public void testBusinessModelColumnUniqueNames() {
    for (BusinessTable table : businessModel.getBusinessTables()) {
      String physicalTableName = table.getPhysicalTable().getName();
      Map<String, String> columnUniqueNames = new HashMap<String, String>();
      for (SimpleBusinessColumn column : table.getSimpleBusinessColumns()) {
        String columnUniqueName = column.getUniqueName();
        String physicalColumnName = column.getPhysicalColumn().getName();

        Assert.assertNotNull(
            "Business column associated to column ["
                + physicalColumnName
                + "] of physical table ["
                + physicalTableName
                + "] have no  unique name",
            columnUniqueName);
        Assert.assertFalse(
            "Column ["
                + physicalColumnName
                + "] and column ["
                + columnUniqueNames.get(columnUniqueName)
                + "] of table ["
                + physicalTableName
                + "] have the same unique name ["
                + columnUniqueName
                + "]",
            columnUniqueNames.containsKey(columnUniqueName));

        columnUniqueNames.put(columnUniqueName, physicalColumnName);
      }
    }
  }
 public void testBusinessModelTableNames() {
   for (BusinessTable table : businessModel.getBusinessTables()) {
     String tableUniqueName = table.getName();
     Assert.assertNotNull(
         "Business table associated with physical table ["
             + table.getPhysicalTable().getName()
             + "] have no name",
         tableUniqueName);
   }
 }
 public void testBusinessModelColumnNames() {
   for (BusinessTable table : businessModel.getBusinessTables()) {
     String physicalTableName = table.getPhysicalTable().getName();
     for (SimpleBusinessColumn column : table.getSimpleBusinessColumns()) {
       String columnName = column.getName();
       Assert.assertNotNull(
           "Business column associated with physical column ["
               + column.getPhysicalColumn().getName()
               + "] of table ["
               + physicalTableName
               + "] have no name ",
           columnName);
     }
   }
 }
  public void testBusinessModelTableUniqueNames() {
    Map<String, String> tableUniqueNames = new HashMap<String, String>();

    for (BusinessTable table : businessModel.getBusinessTables()) {
      String tableUniqueName = table.getUniqueName();
      String physicalTableName = table.getPhysicalTable().getName();

      Assert.assertNotNull(
          "Business table associated with physical table ["
              + physicalTableName
              + "] have no unique name",
          tableUniqueName);
      Assert.assertNotNull(
          "Business table associated with physical table ["
              + physicalTableName
              + "] have an empty unique name",
          physicalTableName.trim().length() > 0);

      char firstChar = tableUniqueName.charAt(0);
      Assert.assertTrue(
          "The unique name ["
              + tableUniqueName
              + "] of business table associated with physical table ["
              + physicalTableName
              + "] does not start with a letter",
          Character.isLetter(firstChar));

      Assert.assertFalse(
          "Unique name ["
              + tableUniqueName
              + "] of table ["
              + physicalTableName
              + "] is equal to unique name of table ["
              + tableUniqueNames.get(tableUniqueName.toLowerCase())
              + "]",
          tableUniqueNames.containsKey(tableUniqueName.toLowerCase()));

      // note: name must be unique in a case unsensitive way: !name1.equalsIgnoreCase(name2)
      tableUniqueNames.put(tableUniqueName.toLowerCase(), physicalTableName);
    }
  }