public void GetBatteryStatusByID([Values(1)] int id) { BatteryStatusDTO status = new BatteryStatusDTO { id = id, date_time = DateTime.Now, status_code = "a1" }; batteryStatusDal.Setup(m => m.GetByID(It.IsNotNull <int>())).Returns(status); var res = manager.GetBatteryStatusByID(id); Assert.IsTrue(res.id == status.id); }
public void AddBatteryStatus() { BatteryStatusDTO status = new BatteryStatusDTO { id = 1, date_time = DateTime.Now, status_code = "a1" }; batteryStatusDal.Setup(m => m.Create(It.IsAny <BatteryStatusDTO>())).Returns(status); var res = manager.AddBatteryStatus(status); Assert.IsTrue(res.id == status.id); }
public BatteryStatusDTO AddBatteryStatus(BatteryStatusDTO status) { return(this._batteryStatusDal.Create(status)); }
public BatteryStatusDTO Update(BatteryStatusDTO dto) { throw new NotImplementedException(); }