Class UniqueConstraintImportTest

  • public class UniqueConstraintImportTest
    extends XMLBaseTest
    Test the influence of unique constraints when importing data. In case of a unique constraint objects with different id's and the same values for the unique key fields can be matched. So if the xml contains an object with id A and a value for a unique key field V1 and in the database there is an object with B which also has the value V1 for the unique key field. Then object A will overwrite object B in the database.
    • Constructor Detail

      • UniqueConstraintImportTest

        public UniqueConstraintImportTest()
    • Method Detail

      • testACreateCountryTrl

        public void testACreateCountryTrl()
        Builds the testdata, CountryTrl objects for a specific Country.
      • testBCountryTrlImport

        public void testBCountryTrlImport()
        Reads CountryTrl objects from the db and imports them again after changing the id. This should result in updates of existing CountryTrl objeccts because they are found using the unique constraint of country and language. This method also cleans up the testdata.