コード例 #1
0
 public void AppendResult_AppendResultWithTwoWarnings_HasTwo()
 {
     var result = new ResultBase();
     var otherResult = new ResultBase();
     var warnings = new System.Collections.Generic.List<ResultItem>
                    {
                        new ResultItem(1, "test2"),
                        new ResultItem(2, "test")
                    };
     otherResult.AddMessages(warnings);
     result.AppendResult(otherResult);
     result.Warnings.Should().HaveCount(2);
 }
コード例 #2
0
 public void AppendResult_AppendResultWithTwoErrors_HasTwo()
 {
     var result = new ResultBase();
     var otherResult = new ResultBase();
     var errors = new System.Collections.Generic.List<ResultItem>
                    {
                        new ResultItem(-1, "test2"),
                        new ResultItem(-2, "test")
                    };
     otherResult.AddMessages(errors);
     result.AppendResult(otherResult);
     result.Errors.Should().HaveCount(2);
 }