Exemplo n.º 1
0
        public void Sample_MethodResultEnumerableDto()
        {
            dynamic accountingCriteriaFactory = new DynamicMock();

            accountingCriteriaFactory.CreateAccountingCriteria(_, _, _, _).Returns(new[]
                                                                                   { new { RequestHashCode = 1 }, new { RequestHashCode = 2 }, new { RequestHashCode = 3 } });

            IAccountingCriteriaFactory result = accountingCriteriaFactory;

            var actual = result.CreateAccountingCriteria(AccountingEntityType.Cashflow, new decimal[0], null, "");

            CollectionAssert.AreEquivalent(new[] { 1, 2, 3 }, actual.Select(c => c.RequestHashCode).ToList());
        }