Error:(9, 21) java: constructor Item in class ru.job4j.tracker.Item cannot be applied to given types;
required: no arguments
found: java.lang.String,java.lang.String,long
reason: actual and formal argument lists differ in length
public class Item {
private String id;
public String name;
public String desc;
public long create;
public void Item(String name, String desc, long create) {
this.name = name;
this.desc = desc;
this.create = create;
}
public Item add(Item item) {
item.setId(this.generateId());
this.items[this.position++] = item;
return item;
}
public void whenAddNewItemThenTrackerHasSameItem() {
Tracker tracker = new Tracker();
Item item = new Item("name", "desc", 435L);
tracker.add(item);
assertThat(tracker.findAll()[0], is(item));
}