use of com.furyviewer.domain.AchievementsAchievs in project FuryViewer by TheDoctor-95.
the class AchievementsAchievsResourceIntTest method updateAchievementsAchievs.
@Test
@Transactional
public void updateAchievementsAchievs() throws Exception {
// Initialize the database
achievementsAchievsRepository.saveAndFlush(achievementsAchievs);
int databaseSizeBeforeUpdate = achievementsAchievsRepository.findAll().size();
// Update the achievementsAchievs
AchievementsAchievs updatedAchievementsAchievs = achievementsAchievsRepository.findOne(achievementsAchievs.getId());
updatedAchievementsAchievs.date(UPDATED_DATE);
restAchievementsAchievsMockMvc.perform(put("/api/achievements-achievs").contentType(TestUtil.APPLICATION_JSON_UTF8).content(TestUtil.convertObjectToJsonBytes(updatedAchievementsAchievs))).andExpect(status().isOk());
// Validate the AchievementsAchievs in the database
List<AchievementsAchievs> achievementsAchievsList = achievementsAchievsRepository.findAll();
assertThat(achievementsAchievsList).hasSize(databaseSizeBeforeUpdate);
AchievementsAchievs testAchievementsAchievs = achievementsAchievsList.get(achievementsAchievsList.size() - 1);
assertThat(testAchievementsAchievs.getDate()).isEqualTo(UPDATED_DATE);
}
use of com.furyviewer.domain.AchievementsAchievs in project FuryViewer by TheDoctor-95.
the class AchievementsAchievsResourceIntTest method createAchievementsAchievs.
@Test
@Transactional
public void createAchievementsAchievs() throws Exception {
int databaseSizeBeforeCreate = achievementsAchievsRepository.findAll().size();
// Create the AchievementsAchievs
restAchievementsAchievsMockMvc.perform(post("/api/achievements-achievs").contentType(TestUtil.APPLICATION_JSON_UTF8).content(TestUtil.convertObjectToJsonBytes(achievementsAchievs))).andExpect(status().isCreated());
// Validate the AchievementsAchievs in the database
List<AchievementsAchievs> achievementsAchievsList = achievementsAchievsRepository.findAll();
assertThat(achievementsAchievsList).hasSize(databaseSizeBeforeCreate + 1);
AchievementsAchievs testAchievementsAchievs = achievementsAchievsList.get(achievementsAchievsList.size() - 1);
assertThat(testAchievementsAchievs.getDate()).isEqualTo(DEFAULT_DATE);
}
use of com.furyviewer.domain.AchievementsAchievs in project FuryViewer by TheDoctor-95.
the class AchievementsAchievsResource method updateAchievementsAchievs.
/**
* PUT /achievements-achievs : Updates an existing achievementsAchievs.
*
* @param achievementsAchievs the achievementsAchievs to update
* @return the ResponseEntity with status 200 (OK) and with body the updated achievementsAchievs,
* or with status 400 (Bad Request) if the achievementsAchievs is not valid,
* or with status 500 (Internal Server Error) if the achievementsAchievs couldn't be updated
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PutMapping("/achievements-achievs")
@Timed
public ResponseEntity<AchievementsAchievs> updateAchievementsAchievs(@RequestBody AchievementsAchievs achievementsAchievs) throws URISyntaxException {
log.debug("REST request to update AchievementsAchievs : {}", achievementsAchievs);
if (achievementsAchievs.getId() == null) {
return createAchievementsAchievs(achievementsAchievs);
}
AchievementsAchievs result = achievementsAchievsRepository.save(achievementsAchievs);
return ResponseEntity.ok().headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, achievementsAchievs.getId().toString())).body(result);
}
use of com.furyviewer.domain.AchievementsAchievs in project FuryViewer by TheDoctor-95.
the class AchievementsAchievsResource method getAchievementsAchievs.
/**
* GET /achievements-achievs/:id : get the "id" achievementsAchievs.
*
* @param id the id of the achievementsAchievs to retrieve
* @return the ResponseEntity with status 200 (OK) and with body the achievementsAchievs, or with status 404 (Not Found)
*/
@GetMapping("/achievements-achievs/{id}")
@Timed
public ResponseEntity<AchievementsAchievs> getAchievementsAchievs(@PathVariable Long id) {
log.debug("REST request to get AchievementsAchievs : {}", id);
AchievementsAchievs achievementsAchievs = achievementsAchievsRepository.findOne(id);
return ResponseUtil.wrapOrNotFound(Optional.ofNullable(achievementsAchievs));
}
use of com.furyviewer.domain.AchievementsAchievs in project FuryViewer by TheDoctor-95.
the class AchievementsAchievsResourceIntTest method equalsVerifier.
@Test
@Transactional
public void equalsVerifier() throws Exception {
TestUtil.equalsVerifier(AchievementsAchievs.class);
AchievementsAchievs achievementsAchievs1 = new AchievementsAchievs();
achievementsAchievs1.setId(1L);
AchievementsAchievs achievementsAchievs2 = new AchievementsAchievs();
achievementsAchievs2.setId(achievementsAchievs1.getId());
assertThat(achievementsAchievs1).isEqualTo(achievementsAchievs2);
achievementsAchievs2.setId(2L);
assertThat(achievementsAchievs1).isNotEqualTo(achievementsAchievs2);
achievementsAchievs1.setId(null);
assertThat(achievementsAchievs1).isNotEqualTo(achievementsAchievs2);
}
Aggregations