public void Update() { UnityResolver.Register(); IBatchManager BatchManager = UnityResolver.Resolve <IBatchManager>(); Batch batch = BatchManager.FindById(91); batch.BatchName = "38Batch" + DateTime.Now.ToString(); bool isUpdate = BatchManager.Update(batch); BatchManager.Save(); Batch batch1 = BatchManager.FindById(93); string expected = "38Batch"; string actual = batch1.BatchName; Assert.AreEqual(expected, actual); }
public void FindById() { UnityResolver.Register(); IBatchManager BatchManager = UnityResolver.Resolve <IBatchManager>(); Batch batch1 = BatchManager.FindById(93); int expected = 93; int actual = batch1.BatchId; Assert.AreEqual(expected, actual); }