-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEitherTests.cs
More file actions
28 lines (25 loc) · 902 Bytes
/
Copy pathEitherTests.cs
File metadata and controls
28 lines (25 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using LanguageExt;
using MessagePack.LanguageExt.UnitTests.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MessagePack.LanguageExt.UnitTests {
[TestClass]
public class EitherTests : BaseTests<Either<string, int>>
{
protected override Either<string, int> CreateDataType()
=> 1;
[TestMethod]
public void ItShouldSerializeAndDeserializeLeftValueContractlessResolver()
{
var a = Prelude.Left<string,int>("test value");
var actual = TestHelpers.Convert(a);
Assert.AreEqual(a, actual);
}
[TestMethod]
public void ItShouldSerializeAndDeserializeLeftValueUsingTypelesssResolver()
{
var a = Prelude.Left<string, int>("test value");
var actual = TestHelpers.TypelessConvert(a);
Assert.AreEqual(a, actual);
}
}
}