@Test public void shouldGetById() throws Exception{ EquipmentType type = new EquipmentType(); type.setName("Test"); type.setCode("Test"); when(mapper.getEquipmentTypeById(1L)).thenReturn(type); EquipmentType result = repository.getEquipmentTypeById(1L); assertEquals(result.getName(), type.getName()); assertEquals(result.getCode(), type.getCode()); }
public EquipmentType getEquipmentTypeById(Long id){ return equipmentTypeMapper.getEquipmentTypeById(id); }
EquipmentTypeRepository { public EquipmentType getEquipmentTypeById(Long id){ return equipmentTypeMapper.getEquipmentTypeById(id); } }
EquipmentTypeRepository { public EquipmentType getEquipmentTypeById(Long id){ return equipmentTypeMapper.getEquipmentTypeById(id); }  }
EquipmentTypeRepository { public EquipmentType getEquipmentTypeById(Long id){ return equipmentTypeMapper.getEquipmentTypeById(id); }  EquipmentType getEquipmentTypeById(Long id); List<EquipmentType> getAll(); void insert(EquipmentType type); void update(EquipmentType type); }
EquipmentTypeRepository { public EquipmentType getEquipmentTypeById(Long id){ return equipmentTypeMapper.getEquipmentTypeById(id); }  EquipmentType getEquipmentTypeById(Long id); List<EquipmentType> getAll(); void insert(EquipmentType type); void update(EquipmentType type);  }