public void Ctor_Default()
        {
            var categoryRepoSetup = new Mock<IRepository<Category>>();
            categoryRepoSetup.SetupGet(x => x.Data).Returns(() => new ObservableCollection<Category>
            {
                new Category {Name = string.Empty}
            });

            var vm = new CategoryListViewModel(categoryRepoSetup.Object, new Mock<IDialogService>().Object);
            vm.Source.ShouldNotBeNull();
        }
Exemple #2
0
 public CategoryDialogViewModel(IRepository <Category> categoryRepository, IDialogService dialogService,
                                CategoryListViewModel categoryListViewModel)
 {
     this.categoryRepository = categoryRepository;
     this.dialogService      = dialogService;
 }
 public CategoryDialogViewModel(IRepository<Category> categoryRepository, IDialogService dialogService,
     CategoryListViewModel categoryListViewModel)
 {
     this.categoryRepository = categoryRepository;
     this.dialogService = dialogService;
 }