---
inputType: CA10__CaAwsInstance__c
conditions:
  - status: COMPLIANT
    currentStateMessage: Simple-1
    check:
      UNIT_TEST:
        id: Simple-1
        expected:
          text: "unitTest(Simple-1): not(number(0.0) > number(1.0))"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  NUMBER: 0
                right:
                  NUMBER: 1
  - status: COMPLIANT
    currentStateMessage: Simple-2
    check:
      UNIT_TEST:
        id: Simple-2
        expected:
          text: "unitTest(Simple-2): number(1.0) > number(0.0)"
        arg:
          GREATER_THAN:
            left:
              NUMBER: 1
            right:
              NUMBER: 0
  - status: COMPLIANT
    currentStateMessage: Simple-3
    check:
      UNIT_TEST:
        id: Simple-3
        expected:
          text: "unitTest(Simple-3): not(number(1.0) > number(1.0))"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  NUMBER: 1
                right:
                  NUMBER: 1
  - status: COMPLIANT
    currentStateMessage: Simple-4
    check:
      UNIT_TEST:
        id: Simple-4
        expected:
          text: "unitTest(Simple-4): number(1.0000000001) > number(1.0)"
        arg:
          GREATER_THAN:
            left:
              NUMBER: 1.0000000001
            right:
              NUMBER: 1
  - status: COMPLIANT
    currentStateMessage: Precision-1
    check:
      UNIT_TEST:
        id: Precision-1
        expected:
          text: "unitTest(Precision-1): number(1.111111111222224E9) > number(1.111111111222223E9)"
        arg:
          GREATER_THAN:
            left:
              NUMBER: 1111111111.222224
            right:
              NUMBER: 1111111111.222223
  - status: COMPLIANT
    currentStateMessage: Precision-2
    check:
      UNIT_TEST:
        id: Precision-2
        expected:
          text: "unitTest(Precision-2): number(1.1111111112222235E9) > number(1.1111111112222233E9)"
        arg:
          GREATER_THAN:
            left:
              NUMBER: 1111111111.2222235
            right:
              NUMBER: 1111111111.2222234
  - status: COMPLIANT
    currentStateMessage: Precision-3
    check:
      UNIT_TEST:
        id: Precision-3
        expected:
          text: "unitTest(Precision-3): not(number(1.1111111112222235E9) > number(1.1111111112222235E9))"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  NUMBER: 1111111111.22222346
                right:
                  NUMBER: 1111111111.22222345
  - status: COMPLIANT
    currentStateMessage: Null-1
    check:
      UNIT_TEST:
        id: Null-1
        expected:
          text: "unitTest(Null-1): not(null > null)"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  UNIT_TEST_NULL:
                    returnType: NUMBER
                right:
                  UNIT_TEST_NULL:
                    returnType: NUMBER
  - status: COMPLIANT
    currentStateMessage: Null-2
    check:
      UNIT_TEST:
        id: Null-2
        expected:
          text: "unitTest(Null-2): not(number(-1.0) > null)"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  NUMBER: -1
                right:
                  UNIT_TEST_NULL:
                    returnType: NUMBER
  - status: COMPLIANT
    currentStateMessage: Null-3
    check:
      UNIT_TEST:
        id: Null-3
        expected:
          text: "unitTest(Null-3): not(number(1.0) > null)"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  NUMBER: 1
                right:
                  UNIT_TEST_NULL:
                    returnType: NUMBER
  - status: COMPLIANT
    currentStateMessage: Null-4
    check:
      UNIT_TEST:
        id: Null-4
        expected:
          text: "unitTest(Null-4): not(null > number(-1.0))"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  UNIT_TEST_NULL:
                    returnType: NUMBER
                right:
                  NUMBER: -1
  - status: COMPLIANT
    currentStateMessage: Null-5
    check:
      UNIT_TEST:
        id: Null-5
        expected:
          text: "unitTest(Null-5): not(null > number(1.0))"
        arg:
          NOT:
            arg:
              GREATER_THAN:
                left:
                  UNIT_TEST_NULL:
                    returnType: NUMBER
                right:
                  NUMBER: 1
  - status: COMPLIANT
    currentStateMessage: Duration-1
    check:
      UNIT_TEST:
        id: Duration-1
        expected:
          text: "unitTest(Duration-1): 'PT1M' > 'PT1S'"
        arg:
          GREATER_THAN:
            left:
              DURATION: "PT1M"
            right:
              DURATION: "PT1S"
  - status: COMPLIANT
    currentStateMessage: Duration-2
    check:
      UNIT_TEST:
        id: Duration-2
        expected:
          text: "unitTest(Duration-2): '1m'.asDuration() > 'PT1S'"
        arg:
          GREATER_THAN:
            left:
              DURATION_FROM:
                arg:
                  TEXT: "1m"
                format: GCP
                undeterminedIf:
                  isEmpty: "Should not happen"
                  invalidFormat: "Should not happen"
            right:
              DURATION: "PT1S"
otherwise:
  status: INCOMPLIANT
  currentStateMessage: Test Failed
  remediationMessage: Developer Fix Required