public void Setup()
        {
            _stuffCategory = new StuffCategory { Name = "DVD Film" };

            _stuffCategoryRepository = MockRepository.GenerateStub<IStuffCategoryRepository>();
            _stuffCategoryRepository.Stub(x => x.GetAll()).Return(new[] { _stuffCategory });
        }
예제 #2
0
 public StuffCategoryViewModel(StuffCategory stuffCategory)
 {
     ID = stuffCategory.Id;
     Name = stuffCategory.Name;
     UniqueSafeName = GetUniqueSafeName(stuffCategory.Name);
 }
예제 #3
0
 private static StuffCategoryViewModel GetStuffCategoryViewModel(StuffCategory sc)
 {
     return new StuffCategoryViewModel(sc);
 }