Skip to content

Commit

Permalink
english
Browse files Browse the repository at this point in the history
  • Loading branch information
abel533 committed Aug 8, 2020
1 parent 3bf2e1a commit cadcc1c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ create table course (
is_deleted integer
);

INSERT INTO course VALUES (1, 'Java入门1', '50', '2015-11-11', '0');
INSERT INTO course VALUES (2, 'Java入门2', '50', '2015-11-11', '0');
INSERT INTO course VALUES (3, 'Java中级', '80', '2017-11-11', '0');
INSERT INTO course VALUES (4, 'Java高级', '100', '2019-11-11', '0');
INSERT INTO course VALUES (1, 'JavaStarter1', '50', '2015-11-11', '0');
INSERT INTO course VALUES (2, 'JavaStarter2', '50', '2015-11-11', '0');
INSERT INTO course VALUES (3, 'Java3', '80', '2017-11-11', '0');
INSERT INTO course VALUES (4, 'Java4', '100', '2019-11-11', '0');
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public void deleteByPropertyTest() {

Course beforeDelete = mapper.selectByPrimaryKey(2);
Assert.assertNotNull(beforeDelete);
Assert.assertEquals("Java入门2", beforeDelete.getName());
Assert.assertEquals("JavaStarter2", beforeDelete.getName());

int deletedCount = mapper.deleteByProperty(Course::getName, "Java入门2");
int deletedCount = mapper.deleteByProperty(Course::getName, "JavaStarter2");
Assert.assertEquals(1, deletedCount);

Course afterDelete = mapper.selectByPrimaryKey(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ create table book (
published date
);

INSERT INTO book VALUES (1, 'Java入门1', '50', '2015-11-11');
INSERT INTO book VALUES (2, 'Java入门2', '50', '2015-11-11');
INSERT INTO book VALUES (3, 'Java中级', '80', '2017-11-11');
INSERT INTO book VALUES (4, 'Java高级', '100', '2019-11-11');
INSERT INTO book VALUES (1, 'JavaStarter1', '50', '2015-11-11');
INSERT INTO book VALUES (2, 'JavaStarter2', '50', '2015-11-11');
INSERT INTO book VALUES (3, 'Java3', '80', '2017-11-11');
INSERT INTO book VALUES (4, 'Java4', '100', '2019-11-11');
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public void selectOneByPropertyTest() {
SqlSession sqlSession = getSqlSession();
try {
BookMapper mapper = sqlSession.getMapper(BookMapper.class);
Book book = mapper.selectOneByProperty(Book::getName, "Java入门1");
Book book = mapper.selectOneByProperty(Book::getName, "JavaStarter1");
Assert.assertNotNull(book);
Assert.assertEquals("Java入门1", book.getName());
Assert.assertEquals("JavaStarter1", book.getName());
} finally {
sqlSession.close();
}
Expand Down

0 comments on commit cadcc1c

Please sign in to comment.