void getTablesTest()

in ddm-rrm/src/it/java/com/epam/digital/data/platform/management/CandidateVersionTableControllerIT.java [57:84]


    void getTablesTest() {
      final var versionCandidateId = context.createVersionCandidate();
      context.prepareRegistryDataSource(versionCandidateId, "liquibase/create-table_1.xml");
      context.prepareRegistryDataSource(versionCandidateId, "liquibase/create-table_2.xml");

      mockMvc.perform(
          get("/versions/candidates/{versionCandidateId}/tables", versionCandidateId)
      ).andExpectAll(
          status().isOk(),
          content().contentType(MediaType.APPLICATION_JSON),
          jsonPath("$", hasSize(5)),
          jsonPath("$.[0].name", is("master_table")),
          jsonPath("$.[0].description", is("table in master version")),
          jsonPath("$.[0].objectReference", is(true)),
          jsonPath("$.[1].name", is("subject")),
          jsonPath("$.[1].description", is(nullValue())),
          jsonPath("$.[1].objectReference", is(false)),
          jsonPath("$.[2].name", is("subject_settings")),
          jsonPath("$.[2].description", is(nullValue())),
          jsonPath("$.[2].objectReference", is(true)),
          jsonPath("$.[3].name", is("table_1")),
          jsonPath("$.[3].description", is("table #1")),
          jsonPath("$.[3].objectReference", is(false)),
          jsonPath("$.[4].name", is("table_2")),
          jsonPath("$.[4].description", is("table #2")),
          jsonPath("$.[4].objectReference", is(false))
      );
    }