Exemplo n.º 1
0
 /**
  * Check values that never change during serialization
  *
  * @param result
  */
 protected void checkDefaultValues(Graphic result) {
   assertThat(result.getSelected()).isNotNull().isEqualTo(Graphic.DEFAULT_SELECTED);
 }
Exemplo n.º 2
0
  protected final void checkGraphicInterfaceFields(Graphic result, Graphic expected) {
    // assertThat(result.getPtsNumber()).isNotNull().isEqualTo(expected.getPtsNumber());
    assertThat(result.getColorPaint()).isNotNull().isEqualTo(expected.getColorPaint());
    assertThat(result.getLineThickness()).isNotNull().isEqualTo(expected.getLineThickness());
    assertThat(result.getLabelVisible()).isNotNull().isEqualTo(expected.getLabelVisible());
    assertThat(result.getFilled()).isNotNull().isEqualTo(expected.getFilled());
    assertThat(result.getLayerType()).isNotNull().isEqualTo(expected.getLayerType());
    assertThat(result.getVariablePointsNumber())
        .isNotNull()
        .isEqualTo(expected.getVariablePointsNumber());

    // Values that are always null when creating new instance
    assertThat(result.getGraphicLabel()).isEqualTo(expected.getGraphicLabel());
    assertThat(result.getLayer()).isEqualTo(expected.getLayer());

    checkDefaultValues(result);
  }