public void TestMergeResultOfResultWorks() { var result = new ParseResult <object>(); var obj = new object(); result.MergeResult(obj); result.AssertNoErrors(); Assert.Empty(result.Errors); Assert.Same(obj, result.Result); }
public void TestMergeResultOfCommandResultWorks() { var result = new ParseResult <object>(); var mockCmdResult = new Mock <ICommandParserResult>(); mockCmdResult.SetupGet(x => x.HasErrors).Returns(false); mockCmdResult.SetupGet(x => x.Errors).Returns(new List <Exception>()); result.MergeResult(mockCmdResult.Object); mockCmdResult.VerifyGet(x => x.HasErrors); result.AssertNoErrors(); }