public void SnoozeVideoWall(VideoWall videoWall)
 {
     cbxVideoWall.Items.Clear();
     cbxVideoWall.Items.Add(videoWall.Location);
     cbxVideoWall.SelectedIndex = 0;
     cbxVideoWall.Enabled       = false;
 }
 public AddScheduleToVideoWallForm(IMainController inController, VideoWall videoWall)
 {
     _controller = inController;
     _videoWall  = videoWall;
     InitializeComponent();
     Icon = Properties.Resources.Icon;
 }
        public void AddNewVideoWall(IAddVideoWallView inForm, IRepository <VideoWall> videoWallRepository)
        {
            var adr  = new Address(inForm.City, inForm.Street, inForm.ZipCode);
            var wall = new VideoWall(inForm.Width, inForm.Height, adr);

            videoWallRepository.Add(wall);
        }
        public void Add_Servicer_With_Wrong_Data_Throw()
        {
            var address   = new Address("Zagreb", "Primorska ulica", 10451);
            var employee  = new Employee("aaaa", "Mirko", "Medvedov");
            var videoWall = new VideoWall(120, 180, address);

            videoWall.Servicers.Add(employee);
        }
        public void AddEmployeeToVideoWall(IAddEmployeeToVideoWallView inForm, VideoWall wall,
                                           IRepository <VideoWall> videoWallRepository, IRepository <Employee> employeeRepository)
        {
            var oib      = inForm.Oib;
            var employee = employeeRepository.FindBy(x => x.Oib == oib);

            wall.Servicers.Add(employee);
            videoWallRepository.Update(wall);
        }
        public void Add_Servicer()
        {
            var address   = new Address("Zagreb", "Primorska ulica", 10451);
            var employee  = new Employee("12345678901", "Mirko", "Medvedov");
            var videoWall = new VideoWall(120, 180, address);

            videoWall.Servicers.Add(employee);
            Assert.AreEqual(videoWall.Servicers.Count, 1);
            Assert.AreEqual(videoWall.Servicers[0].Name, "Mirko");
        }
        public void AddScheduleToVideoWall(IAddScheduleToVideoWallView inForm, VideoWall wall,
                                           IRepository <VideoWall> videoWallRepository, IRepository <Schedule> scheduleRepository)
        {
            var scheduleName = inForm.NameOfSchedule;
            var schedule     = scheduleRepository.FindBy(x => x.Name == scheduleName);

            wall.Status = VideoWallStatus.USED;
            wall.Schedules.Add(schedule);
            videoWallRepository.Update(wall);
        }
        public void Add_Schedule()
        {
            var address   = new Address("Zagreb", "Primorska ulica", 10451);
            var day       = DateTime.Now;
            var startTime = new DateTime(day.Year, day.Month, day.Day, 8, 0, 0);
            var endTime   = new DateTime(day.Year, day.Month, day.Day, 16, 0, 0);
            var schedule  = new Schedule(@"oglasi", startTime, endTime);

            var videoWall = new VideoWall(120, 180, address);

            videoWall.Schedules.Add(schedule);

            Assert.AreEqual(videoWall.Schedules.Count, 1);
            Assert.AreEqual(videoWall.Schedules[0].Name, "oglasi");
        }
Exemple #9
0
        public void Add_Service()
        {
            var address   = new Address("Zagreb", "Primorska ulica", 10451);
            var employee  = new Employee("12345678901", "Mirko", "Medvedov");
            var videoWall = new VideoWall(120, 180, address);

            var day       = DateTime.Now;
            var startTime = new DateTime(day.Year, day.Month, day.Day, 8, 0, 0);
            var endTime   = new DateTime(day.Year, day.Month, day.Day, 16, 0, 0);


            var service = new Service(employee, startTime, endTime, FailureType.ELECTRICAL, videoWall);

            Assert.AreEqual(service.FailureType, FailureType.ELECTRICAL);
            Assert.AreEqual(service.ServiceEnd, endTime);
            Assert.AreEqual(service.ServiceStart, startTime);
            Assert.AreEqual(service.VideoWall.Location, videoWall.Location);
            Assert.AreEqual(service.VideoWall.Status, videoWall.Status);
            Assert.AreEqual(service.ServicedBy, employee);
        }
Exemple #10
0
 public void Bad_Height_Throw()
 {
     var address   = new Address("Zagreb", "Primorska ulica", 10451);
     var videoWall = new VideoWall(120, -180, address);
 }
Exemple #11
0
 public void Bad_Width_Throw()
 {
     var address   = new Address("Zagreb", "Primorska ulica", 10451);
     var videoWall = new VideoWall(-120, 180, address);
 }
Exemple #12
0
 public void Location_Null_Throw()
 {
     var videoWall = new VideoWall(120, 180, null);
 }
Exemple #13
0
 public void AddEmployeeToVideoWall(IAddEmployeeToVideoWallView inForm, VideoWall wall)
 {
     _videoWallController.AddEmployeeToVideoWall(inForm, wall, _videoWallRepository, _employeeRepository);
 }
Exemple #14
0
 public void AddScheduleToVideoWall(IAddScheduleToVideoWallView inForm, VideoWall wall)
 {
     _videoWallController.AddScheduleToVideoWall(inForm, wall, _videoWallRepository, _scheduleRepository);
 }