forked from Realhedin/topjava02
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMealTestData.java
More file actions
36 lines (28 loc) · 1.43 KB
/
MealTestData.java
File metadata and controls
36 lines (28 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package ru.javawebinar.topjava;
import ru.javawebinar.topjava.TestUtil.ToStringModelMatcher;
import ru.javawebinar.topjava.matcher.ModelMatcher;
import ru.javawebinar.topjava.model.BaseEntity;
import ru.javawebinar.topjava.model.UserMeal;
import java.time.LocalDateTime;
import static java.time.LocalDateTime.of;
/**
* GKislin
* 13.03.2015.
*/
public class MealTestData {
public static final int MEAL1_ID = BaseEntity.START_SEQ + 2;
public static final UserMeal MEAL1 = new UserMeal(MEAL1_ID, LocalDateTime.of(2015, 1, 6, 9, 0), "breakfast", 500);
public static final UserMeal MEAL2 = new UserMeal(MEAL1_ID + 1, LocalDateTime.of(2015, 1, 6, 13, 0), "dinner", 1000);
public static final UserMeal MEAL3 = new UserMeal(MEAL1_ID + 2, LocalDateTime.of(2015, 1, 7, 0, 0), "supper", 600);
public static final UserMeal MEAL4 = new UserMeal(MEAL1_ID + 3, LocalDateTime.of(2015, 1, 7, 13, 0), "dinner", 1300);
public static final UserMeal ADMIN_MEAL = new UserMeal(MEAL1_ID + 4, LocalDateTime.of(2015, 1, 6, 14, 0), "admin_meal", 2000);
public static UserMeal getCreated() {
return new UserMeal(null, of(2015, 1, 8, 18, 0), "created", 300);
}
public static UserMeal getUpdated() {
UserMeal updated = new UserMeal(MEAL1);
updated.setDescription("Updated breakfast");
return updated;
}
public static final ModelMatcher<UserMeal, String> MATCHER = new ToStringModelMatcher<>(UserMeal.class);
}