content: package com.konsol.beatstream.domain;
  
  import static com.konsol.beatstream.domain.AssertUtils.bigDecimalCompareTo;
  import static org.assertj.core.api.Assertions.assertThat;
  
  public class TaskNodeAsserts {
  
      /**
       * Asserts that the entity has all properties (fields/relationships) set.
       *
       * @param expected the expected entity
       * @param actual the actual entity
       */
      public static void assertTaskNodeAllPropertiesEquals(TaskNode expected, TaskNode actual) {
          assertTaskNodeAutoGeneratedPropertiesEquals(expected, actual);
          assertTaskNodeAllUpdatablePropertiesEquals(expected, actual);
      }
  
      /**
       * Asserts that the entity has all updatable properties (fields/relationships) set.
       *
       * @param expected the expected entity
       * @param actual the actual entity
       */
      public static void assertTaskNodeAllUpdatablePropertiesEquals(TaskNode expected, TaskNode actual) {
          assertTaskNodeUpdatableFieldsEquals(expected, actual);
          assertTaskNodeUpdatableRelationshipsEquals(expected, actual);
      }
  
      /**
       * Asserts that the entity has all the auto generated properties (fields/relationships) set.
       *
       * @param expected the expected entity
       * @param actual the actual entity
       */
      public static void assertTaskNodeAutoGeneratedPropertiesEquals(TaskNode expected, TaskNode actual) {
          assertThat(expected)
              .as("Verify TaskNode auto generated properties")
              .satisfies(e -> assertThat(e.getId()).as("check id").isEqualTo(actual.getId()));
      }
  
      /**
       * Asserts that the entity has all the updatable fields set.
       *
       * @param expected the expected entity
       * @param actual the actual entity
       */
      public static void assertTaskNodeUpdatableFieldsEquals(TaskNode expected, TaskNode actual) {
          assertThat(expected)
              .as("Verify TaskNode relevant properties")
              .satisfies(e -> assertThat(e.getReferenceType()).as("check referenceType").isEqualTo(actual.getReferenceType()))
              .satisfies(e -> assertThat(e.getReferenceId()).as("check referenceId").isEqualTo(actual.getReferenceId()))
              .satisfies(e -> assertThat(e.getTaskName()).as("check taskName").isEqualTo(actual.getTaskName()))
              .satisfies(e -> assertThat(e.getTaskLog()).as("check taskLog").isEqualTo(actual.getTaskLog()))
              .satisfies(e -> assertThat(e.getTrackId()).as("check trackId").isEqualTo(actual.getTrackId()))
              .satisfies(e -> assertThat(e.getScheduledStartTime()).as("check scheduledStartTime").isEqualTo(actual.getScheduledStartTime()))
              .satisfies(e ->
                  assertThat(e.getStartDelayMinutes())
                      .as("check startDelayMinutes")
                      .usingComparator(bigDecimalCompareTo)
                      .isEqualTo(actual.getStartDelayMinutes())
              )
              .satisfies(e ->
                  assertThat(e.getStartDelayHours())
                      .as("check startDelayHours")
                      .usingComparator(bigDecimalCompareTo)
                      .isEqualTo(actual.getStartDelayHours())
              )
              .satisfies(e ->
                  assertThat(e.getElapsedHours())
                      .as("check elapsedHours")
                      .usingComparator(bigDecimalCompareTo)
                      .isEqualTo(actual.getElapsedHours())
              )
              .satisfies(e ->
                  assertThat(e.getElapsedMinutes())
                      .as("check elapsedMinutes")
                      .usingComparator(bigDecimalCompareTo)
                      .isEqualTo(actual.getElapsedMinutes())
              )
              .satisfies(e ->
                  assertThat(e.getProgressPercentage())
                      .as("check progressPercentage")
                      .usingComparator(bigDecimalCompareTo)
                      .isEqualTo(actual.getProgressPercentage())
              )
              .satisfies(e -> assertThat(e.getDownloadFilesize()).as("check downloadFilesize").isEqualTo(actual.getDownloadFilesize()))
              .satisfies(e -> assertThat(e.getDownloadSpeed()).as("check downloadSpeed").isEqualTo(actual.getDownloadSpeed()))
              .satisfies(e -> assertThat(e.getDownloadEta()).as("check downloadEta").isEqualTo(actual.getDownloadEta()))
              .satisfies(e ->
                  assertThat(e.getNodeIndex()).as("check nodeIndex").usingComparator(bigDecimalCompareTo).isEqualTo(actual.getNodeIndex())
              )
              .satisfies(e -> assertThat(e.getStatus()).as("check status").isEqualTo(actual.getStatus()))
              .satisfies(e -> assertThat(e.getType()).as("check type").isEqualTo(actual.getType()))
              .satisfies(e ->
                  assertThat(e.getRetryCount()).as("check retryCount").usingComparator(bigDecimalCompareTo).isEqualTo(actual.getRetryCount())
              )
              .satisfies(e ->
                  assertThat(e.getMaxRetryCount())
                      .as("check maxRetryCount")
                      .usingComparator(bigDecimalCompareTo)
                      .isEqualTo(actual.getMaxRetryCount())
              );
      }
  
      /**
       * Asserts that the entity has all the updatable relationships set.
       *
       * @param expected the expected entity
       * @param actual the actual entity
       */
      public static void assertTaskNodeUpdatableRelationshipsEquals(TaskNode expected, TaskNode actual) {
          assertThat(expected)
              .as("Verify TaskNode relationships")
              .satisfies(e -> assertThat(e.getParentTask()).as("check parentTask").isEqualTo(actual.getParentTask()));
      }
  }
  