Beispiel #1
0
        public FileResult DownloadRpt(int Id = 0)
        {
            layoutService = new LayoutService();

            LayoutModel model = layoutService.GetById(Id);

            string fileName = model.LayoutName + ".rpt";

            return(File(model.Data, System.Net.Mime.MediaTypeNames.Application.Octet, fileName));
        }
        public void Update_With_Correct_Layout()
        {
            //Arrange
            var layoutDTO = new LayoutDTO {
                Name = "test", Description = "test", VenueId = 1
            };

            //Act
            service.Create(layoutDTO);
            var layoutDTOForUpdate = new LayoutDTO {
                Id = 1, Name = "update", Description = "update", VenueId = 2
            };

            service.Update(layoutDTOForUpdate);

            //Assert
            Assert.AreEqual(service.GetById(1).Name, "update");
        }
Beispiel #3
0
 public void GetById()
 {
     //Assert
     Assert.AreEqual(service.GetById(1).Name, "Layout 1");
 }