public void CanSerializeNestedDU() { var expected = DU2.NewC(DU1.NewA(1)); Serialize(expected); Reset(); var actual = Deserialize <object>(); Assert.AreEqual(expected, actual); }
public void CanSerializeOptionalDU() { var expected = DU2.NewE(FSharpOption <DU1> .Some(DU1.NewA(1))); Serialize(expected); Reset(); var actual = Deserialize <object>(); Assert.AreEqual(expected, actual); }
public void CanSerializeOptionalDU() { var expected = DU2.NewE(FSharpOption <DU1> .Some(DU1.NewA(1))); Serialize(expected); Reset(); var actual = Deserialize <object>(); expected.ShouldDeepEqual(actual); }
public void CanSerializeNestedDU() { var expected = DU2.NewC(DU1.NewA(1)); Serialize(expected); Reset(); var actual = Deserialize <object>(); expected.ShouldDeepEqual(actual); }
protected override void Init() { base.Init(); list = ListModule.OfArray(new[] { 123, 2342355, 456456467578, 234234, -234281 }); set = SetModule.OfArray(new[] { 123, 2342355, 456456467578, 234234, -234281 }); record = new TestRecord( name: "John Doe", aref: FSharpOption <string> .Some("ok"), connections: "test"); du = DU2.NewC(DU1.NewB("test", 123)); sdu = SDU1.NewB("hello", 123); }
public void Serialize_DiscriminatedUnion() { SerializeAndCount(DU2.NewC(DU1.NewB("test", 123))); }
public override void Setup(BenchmarkContext context) { base.Setup(context); InitStreamWith(DU2.NewC(DU1.NewB("test", 123))); }