using System; using System.Collections.Generic; using System.Linq; using System.Text; using Chefbook.ViewModels; using Chefbook.DataObjects; using Chefbook.DataAccess; namespace UnitTests.ViewModelsTests { public static class ViewModelTestHelper { public static CategoryViewModel NewCategoryViewModel(CategoryViewModel parent, ChefbookXmlRepository repository) { if (parent == null) { return new CategoryViewModel(new Category(null), repository); } return new CategoryViewModel(new Category(parent.CategoryModel),repository); } public static RecipeViewModel NewRecipeViewModel(CategoryViewModel parent, ChefbookXmlRepository repository) { if (parent == null) { return new RecipeViewModel(new Recipe(null), repository); } return new RecipeViewModel(new Recipe(parent.CategoryModel), repository); } } }