-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f16e772
commit a6192e6
Showing
12 changed files
with
56 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ android { | |
|
||
greendao { | ||
schemaVersion 1000 | ||
generateTests true | ||
} | ||
|
||
dependencies { | ||
|
2 changes: 1 addition & 1 deletion
2
...o/entityannotation/CustomerOrderTest.java → ...t/entityannotation/CustomerOrderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...tion/src/androidTest/Java/org/greenrobot/greendao/test/entityannotation/CustomerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.greenrobot.greendao.test.entityannotation; | ||
|
||
import org.greenrobot.greendao.test.AbstractDaoTestLongPk; | ||
|
||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
public class CustomerTest extends AbstractDaoTestLongPk<CustomerDao, Customer> { | ||
private AtomicLong nameNumber = new AtomicLong(); | ||
|
||
public CustomerTest() { | ||
super(CustomerDao.class); | ||
} | ||
|
||
@Override | ||
protected Customer createEntity(Long key) { | ||
Customer entity = new Customer(); | ||
entity.setId(key); | ||
entity.setName("Ho " + nameNumber.incrementAndGet()); | ||
return entity; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...otation/src/androidTest/Java/org/greenrobot/greendao/test/entityannotation/OrderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.greenrobot.greendao.test.entityannotation; | ||
|
||
import org.greenrobot.greendao.test.AbstractDaoTestLongPk; | ||
|
||
public class OrderTest extends AbstractDaoTestLongPk<OrderDao, Order> { | ||
|
||
public OrderTest() { | ||
super(OrderDao.class); | ||
} | ||
|
||
@Override | ||
protected Order createEntity(Long key) { | ||
Order entity = new Order(); | ||
entity.setId(key); | ||
entity.setCustomerId(1); | ||
return entity; | ||
} | ||
|
||
} |
5 changes: 0 additions & 5 deletions
5
...TestEntityAnnotation/src/main/java/org/greenrobot/greendao/entityannotation/NoteType.java
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...nrobot/greendao/entityannotation/App.java → ...t/greendao/test/entityannotation/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...t/greendao/entityannotation/Customer.java → ...endao/test/entityannotation/Customer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ntityAnnotation/src/main/java/org/greenrobot/greendao/test/entityannotation/NoteType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.greenrobot.greendao.test.entityannotation; | ||
|
||
public enum NoteType { | ||
TEXT, LIST, PICTURE | ||
} |
2 changes: 1 addition & 1 deletion
2
...o/entityannotation/NoteTypeConverter.java → ...t/entityannotation/NoteTypeConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...obot/greendao/entityannotation/Order.java → ...greendao/test/entityannotation/Order.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters