public void should_Save_Or_Update_Obs_New() { var newObs = _obs; newObs.Id = LiveGuid.NewGuid(); _obsRepository.SaveOrUpdate(newObs); _obsRepository = new ObsRepository(_liveSetting); var savedNewObs = _obsRepository.Get(newObs.Id); Assert.AreEqual(newObs.Id, savedNewObs.Id); Assert.IsNotNull(savedNewObs); }
public void should_Save_Or_Update_Obs_Exisitng() { var exisingObs = _obs; exisingObs.ValueText = "TTTT"; _obsRepository.SaveOrUpdate(exisingObs); _obsRepository = new ObsRepository(_liveSetting); var savedNewObs = _obsRepository.Get(exisingObs.Id); Assert.IsNotNull(savedNewObs); Assert.AreEqual("TTTT", savedNewObs.ValueText); }