All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lucuma.itc.client.arb.ArbGmosCustomMask.scala Maven / Gradle / Ivy

There is a newer version: 0.22.7
Show newest version
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package lucuma.itc.client
package arb

import lucuma.core.enums.GmosCustomSlitWidth
import lucuma.core.util.arb.ArbEnumerated
import org.scalacheck.*
import org.scalacheck.Arbitrary.arbitrary

trait ArbGmosCustomMask {

  import ArbEnumerated.given

  given Arbitrary[GmosCustomMask] =
    Arbitrary {
      for {
        w <- arbitrary[GmosCustomSlitWidth]
        n <- arbitrary[String]
      } yield GmosCustomMask(w, n)
    }

  given Cogen[GmosCustomMask] =
    Cogen[
      (
        GmosCustomSlitWidth,
        String
      )
    ].contramap { a =>
      (
        a.slitWidth,
        a.fileName
      )
    }

}

object ArbGmosCustomMask extends ArbGmosCustomMask




© 2015 - 2024 Weber Informatics LLC | Privacy Policy