public void ApplyOption_OnSome_WhenResultIsNullReference_IsTypedNone() { Option <TestObject> some = new TestObject(); var result = some.Apply <TestObject>(_ => null); result.Should().BeOfType <None <TestObject> >(); }
public void Apply_OnSome_ReturnsResultTypeSome() { Option <TestObject> some = new TestObject(); var result = some.Apply(obj => obj.Property); result.Should().BeOfType <Some <TestObject.TestProperty> >(); }
public void Apply_OnSome_WhenResultIsNoneValue_IsTypedNone() { Option <TestObject> some = new TestObject(); var result = some.Apply <TestObject>(_ => None.Value); result.Should().BeOfType <None <TestObject> >(); }