Ejemplo n.º 1
0
  @Test
  @Transactional
  public void createOs_type() throws Exception {
    int databaseSizeBeforeCreate = os_typeRepository.findAll().size();

    // Create the Os_type

    restOs_typeMockMvc
        .perform(
            post("/api/os_types")
                .contentType(TestUtil.APPLICATION_JSON_UTF8)
                .content(TestUtil.convertObjectToJsonBytes(os_type)))
        .andExpect(status().isCreated());

    // Validate the Os_type in the database
    List<Os_type> os_types = os_typeRepository.findAll();
    assertThat(os_types).hasSize(databaseSizeBeforeCreate + 1);
    Os_type testOs_type = os_types.get(os_types.size() - 1);
    assertThat(testOs_type.getOs_type_name()).isEqualTo(DEFAULT_OS_TYPE_NAME);
    assertThat(testOs_type.getDescription()).isEqualTo(DEFAULT_DESCRIPTION);
    assertThat(testOs_type.getStatus_id()).isEqualTo(DEFAULT_STATUS_ID);
    assertThat(testOs_type.getCreated_by()).isEqualTo(DEFAULT_CREATED_BY);
    assertThat(testOs_type.getCreated_date()).isEqualTo(DEFAULT_CREATED_DATE);
    assertThat(testOs_type.getModified_by()).isEqualTo(DEFAULT_MODIFIED_BY);
    assertThat(testOs_type.getModified_date()).isEqualTo(DEFAULT_MODIFIED_DATE);
  }