use of org.apache.shenyu.admin.model.entity.MetaDataDO in project incubator-shenyu by apache.
the class MetaDataMapperTest method selectByQuery.
@Test
public void selectByQuery() {
MetaDataDO metaDataDO = getMetaDataDO();
int count = metaDataMapper.insert(metaDataDO);
assertThat(count, comparesEqualTo(1));
MetaDataQuery metaDataQuery = new MetaDataQuery();
metaDataQuery.setAppName(metaDataDO.getAppName());
metaDataQuery.setPageParameter(new PageParameter());
List<MetaDataDO> result = metaDataMapper.selectByQuery(metaDataQuery);
assertThat(result.size(), comparesEqualTo(1));
assertThat(result.get(0).getId(), comparesEqualTo(metaDataDO.getId()));
}
use of org.apache.shenyu.admin.model.entity.MetaDataDO in project incubator-shenyu by apache.
the class MetaDataMapperTest method findAll.
@Test
public void findAll() {
MetaDataDO metaDataDO = getMetaDataDO();
int count = metaDataMapper.insert(metaDataDO);
assertThat(count, comparesEqualTo(1));
List<MetaDataDO> result = metaDataMapper.findAll();
assertThat(result.size(), comparesEqualTo(1));
assertThat(result.get(0).getId(), comparesEqualTo(metaDataDO.getId()));
}
use of org.apache.shenyu.admin.model.entity.MetaDataDO in project incubator-shenyu by apache.
the class MetaDataMapperTest method selectAll.
@Test
public void selectAll() {
MetaDataDO metaDataDO = getMetaDataDO();
int count = metaDataMapper.insert(metaDataDO);
assertThat(count, comparesEqualTo(1));
List<MetaDataDO> result = metaDataMapper.selectAll();
assertThat(result.size(), comparesEqualTo(1));
assertThat(result.get(0).getId(), comparesEqualTo(metaDataDO.getId()));
}
use of org.apache.shenyu.admin.model.entity.MetaDataDO in project incubator-shenyu by apache.
the class MetaDataMapperTest method findByPath.
@Test
public void findByPath() {
MetaDataDO metaDataDO = getMetaDataDO();
int count = metaDataMapper.insert(metaDataDO);
assertThat(count, comparesEqualTo(1));
MetaDataDO result = metaDataMapper.findByPath(metaDataDO.getPath());
assertThat(result.getId(), comparesEqualTo(metaDataDO.getId()));
}
use of org.apache.shenyu.admin.model.entity.MetaDataDO in project incubator-shenyu by apache.
the class MetaDataMapperTest method selectById.
@Test
public void selectById() {
MetaDataDO metaDataDO = getMetaDataDO();
int count = metaDataMapper.insert(metaDataDO);
assertThat(count, comparesEqualTo(1));
String id = metaDataDO.getId();
MetaDataDO result = metaDataMapper.selectById(id);
assertThat(result.getId(), comparesEqualTo(id));
}
Aggregations