using Barotrauma; using FsCheck; using Microsoft.Xna.Framework; namespace TestProject { public static class TestProject { public class CustomGenerators { public static Arbitrary Vector2Generator() { return Arb.From(from int x in Arb.Generate() from int y in Arb.Generate() select new Vector2(x, y)); } public static Arbitrary ColorGenerator() { return Arb.From(from int r in Gen.Choose(0, 255) from int g in Gen.Choose(0, 255) from int b in Gen.Choose(0, 255) select new Color(r, g, b)); } public static Arbitrary> OptionalGenerator() { return Arb.From(from T x in Arb.Generate() from bool isNone in Arb.Generate() select x is null || isNone ? Option.None() : Option.Some(x)); } } } }