예제 #1
0
        public static void EqualWithoutActuals(Category expected, Category actual)
        {
            Assert.Equal(expected.Name, actual.Name);
            Assert.Equal(expected.BudgetLineItems.Count, actual.BudgetLineItems.Count);

            foreach (var budgetLineItem in expected.BudgetLineItems)
            {
                var actualLineItem = actual.BudgetLineItems.Single(b => b.Name == budgetLineItem.Name);
                BudgetLineItemAssert.EqualWithoutActuals(budgetLineItem, actualLineItem);
            }
        }
예제 #2
0
        public static void Equal(Category category, BudgetCategoryViewModel viewModel)
        {
            Assert.Equal(category.Name, viewModel.Name);
            Assert.Equal(category.BudgetLineItems.Count, viewModel.LineItems.Length);

            foreach (var itemViewModel in category.BudgetLineItems)
            {
                var lineItem = viewModel.LineItems.Single(b => b.Name == itemViewModel.Name);
                BudgetLineItemAssert.Equal(itemViewModel, lineItem);
            }
        }