 ;; This test demonstrates how granule's platform references the collection's platform and its aliases
 ;; The platform aliases defined in the humanizer: "AM-1" is the alias for "Terra"
 (deftest granule-match-parent-collection-platform-alias-test
-  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
+  (let [psa1 (data-umm-c/additional-attribute {:Name "a-float" :DataType "FLOAT" :ParameterRangeBegin 1.0 :ParameterRangeEnd 10.0})
         gpsa (dg/psa "a-float" [7.0])
-        projects (dc/projects "proj")
+        projects (data-umm-c/projects "proj")
         mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
         gran-spatial-rep (apply dg/spatial [mbr1])
-        two-d-cs {:name "BRAVO"
-                  :coordinate-1 {:min-value 100
-                                 :max-value 200}
-                  :coordinate-2 {:min-value 300
-                                 :max-value 400}}
+        two-d-cs {:TilingIdentificationSystemName "BRAVO"
+                  :Coordinate1 {:MinimumValue 100
+                                :MaximumValue 200}
+                  :Coordinate2 {:MinimumValue 300
+                                :MaximumValue 400}}
         g-two-d-cs (dg/two-d-coordinate-system
                      {:name "BRAVO"
                       :start-coordinate-1 110

;; This test demonstrates how granule's tile references the collection's tile and its aliases.
;; The tile aliases defined in the humanizer: "SOURCE_TILE" is the alias for "REPLACEMENT_TILE"
(deftest granule-match-parent-collection-tile-alias-test
  (let [psa1 (dc/psa {:name "a-float" :data-type :float :min-value 1.0 :max-value 10.0})
        gpsa (dg/psa "a-float" [7.0])
        i1 (dc/instrument {:short-name "instrument-Sn A"})
        ir1 (dg/instrument-ref {:short-name "instrument-Sn A"})
        p1 (dc/platform {:short-name "platform-Sn A" :instruments [i1]})
        pr1 (dg/platform-ref {:short-name "platform-Sn A" :instrument-refs [ir1]})
        projects (dc/projects "proj")
        mbr1 (umm-s/set-coordinate-system :geodetic (m/mbr 10 10 20 0))
        gran-spatial-rep (apply dg/spatial [mbr1])
        c-two-d-cs-A {:name "SOURCE_TILE"
                      :coordinate-1 {:min-value 100
                                     :max-value 200}
                      :coordinate-2 {:min-value 300
                                     :max-value 400}}
        c-two-d-cs-B {:name "REPLACEMENT_TILE"
                      :coordinate-1 {:min-value 100
                                     :max-value 200}
                      :coordinate-2 {:min-value 300
                                     :max-value 400}}
        g-two-d-cs-A (dg/two-d-coordinate-system
                       {:name "SOURCE_TILE"
                        :start-coordinate-1 110



          "ISO19115 collection"
          []
          gran-for-iso19115-coll

          "ISO-SMAP collection"
          ["The following list of Additional Attributes did not exist in the referenced parent collection: [a-float]."
           "[Geometries] cannot be set when the parent collection's GranuleSpatialRepresentation is NO_SPATIAL"]
          gran-for-iso-smap-coll)))

