FruityFoundation/Base.Tests/Structures/NullableExtensionTests.cs

16 lines
380 B
C#
Raw Normal View History

2023-08-01 22:12:54 -04:00
using FruityFoundation.Base.Structures;
using NUnit.Framework;
namespace Base.Tests.Structures;
public class NullableExtensionTests
{
[Test]
public void TestNullableStructOfNullToMaybe() =>
Assert.AreEqual(Maybe.Empty<int>(), ((int?)null).ToMaybe());
[Test]
public void TestNullableStructOfValueToMaybe() =>
Assert.AreEqual(Maybe.Just(25), ((int?)25).ToMaybe());
}