예제 #1
0
        protected override void Arrange()
        {
            base.Arrange();

            this.model1 = new Cheese { Id = 1 };
            this.model2 = new Cheese { Id = 2 };

            var viewModels = new List<Cheese> { this.model1, this.model2 };

            A.CallTo(() => this.CheeseService.GetAll()).Returns(viewModels);
        }
예제 #2
0
        public void Register(Cheese cheese)
        {
            this.cheeseDataRepository.Create(
                new CheeseData
                    {
                        Name = cheese.Name,
                        Description = cheese.Description,
                        Image = cheese.Image,
                        Created = DateTime.Now
                    });

            this.unitOfWork.Save();
        }
 protected override void Arrange()
 {
     base.Arrange();
     this.model = new Cheese { Name = "Name", Description = "Description", Image = new byte[0] };
 }