public void Add_New_Floor_Change_Event()
        {
            FloorChangeEvent floorChange = new FloorChangeEvent()
            {
                TriggerTime    = DateTime.Now.Date.AddDays(1).AddHours(2).AddMinutes(30),
                Username       = "******",
                BuildingNumber = 6,
                Floor          = 2
            };

            floorChangeEventService.Add(floorChange);

            FloorChangeEvent last = floorChangeEventService.GetAll().Last();

            Assert.True(
                last.TriggerTime.Equals(floorChange.TriggerTime) &&
                last.Username == floorChange.Username &&
                last.BuildingNumber == floorChange.BuildingNumber &&
                last.Floor == floorChange.Floor
                );
        }
예제 #2
0
 public ActionResult AddFloorChangeEvent(FloorChangeEvent floorChangeEvent)
 {
     _floorChangeService.Add(floorChangeEvent);
     return(NoContent());
 }
 public void Add(FloorChangeEvent floorChangeEvent)
 {
     _floorChangeRepository.Add(floorChangeEvent);
 }