public static void Flatten_SomeOfSome_ForValueT() { // Arrange Maybe <Maybe <int> > square = Maybe.Some(One); // Act & Assert Assert.Equal(One, square.Flatten()); }
public static void Flatten_SomeOfSome_ForValueT_AndNullable() { // Arrange Maybe <int?> one = One.Select(x => (int?)x); Maybe <Maybe <int?> > square = Maybe.Some(one); // Act & Assert Assert.Equal(one, square.Flatten()); }
public static void Flatten_SomeOfSome_ForReferenceT_AndNullable() { // Arrange Maybe <AnyT?> some = AnyT.Some.Select(x => (AnyT?)x); Maybe <Maybe <AnyT?> > square = Maybe.Some(some); // Act & Assert Assert.Equal(some, square.Flatten()); }