@Test public void should_load_all_rows_for_table_from_yaml_file() throws Exception { // given final InputStream input = getClass().getClassLoader().getResourceAsStream("one-table.yml"); // when YamlDataSet yamlDataSet = new YamlDataSet(input); // then TableAssert.assertThat(yamlDataSet.getTable("useraccount")).hasRows(2); }
@Test public void should_load_all_columns_for_table_from_yaml_file() throws Exception { // given final InputStream input = getClass().getClassLoader().getResourceAsStream("one-table.yml"); // when YamlDataSet yamlDataSet = new YamlDataSet(input); // then TableAssert.assertThat(yamlDataSet.getTable("useraccount")) .hasColumns("id", "firstname", "lastname", "username", "password", "email"); }
@Test public void should_load_all_rows_with_content_for_table_from_yaml_file() throws Exception { // given final InputStream input = getClass().getClassLoader().getResourceAsStream("one-table.yml"); // when YamlDataSet yamlDataSet = new YamlDataSet(input); // then TableAssert.assertThat(yamlDataSet.getTable("useraccount")) .hasRow( "id: 1", "firstname: John", "lastname: Smith", "username: doovde", "password: password") .hasRow( "id: 2", "firstname: Clark", "lastname: Kent", "username: superman", "password: kryptonite", "email: [email protected]"); }