private void compareFirstValueWith(AnalysisPropertyDto analysisPropertyDto) { AnalysisPropertyDto dtoFromDatabase = underTest.selectBySnapshotUuid(dbSession, analysisPropertyDto.getSnapshotUuid()).get(0); assertThat(dtoFromDatabase).isEqualTo(analysisPropertyDto); } }
public void insert(DbSession session, AnalysisPropertyDto analysisPropertyDto) { requireNonNull(analysisPropertyDto.getUuid(), "uuid cannot be null"); requireNonNull(analysisPropertyDto.getKey(), "key cannot be null"); requireNonNull(analysisPropertyDto.getSnapshotUuid(), "snapshot uuid cannot be null"); requireNonNull(analysisPropertyDto.getValue(), "value cannot be null"); String value = analysisPropertyDto.getValue(); long now = system2.now(); if (isEmpty(value)) { getMapper(session).insertAsEmpty(analysisPropertyDto, now); } else if (mustBeStoredInClob(value)) { getMapper(session).insertAsClob(analysisPropertyDto, now); } else { getMapper(session).insertAsText(analysisPropertyDto, now); } }
new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue(underTest.getValue())); new AnalysisPropertyDto() .setUuid("1" + underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue(underTest.getValue())); new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid("1" + underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue(underTest.getValue())); new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey("1" + underTest.getKey()) .setValue(underTest.getValue())); new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue("1" + underTest.getValue()));
new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue(underTest.getValue()) new AnalysisPropertyDto() .setUuid("1" + underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue(underTest.getValue()) new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid("1" + underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue(underTest.getValue()) new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey("1" + underTest.getKey()) .setValue(underTest.getValue()) new AnalysisPropertyDto() .setUuid(underTest.getUuid()) .setSnapshotUuid(underTest.getSnapshotUuid()) .setKey(underTest.getKey()) .setValue("1" + underTest.getValue())