public void LookupManager_Delete_DeleteALookupEntityByInvalidId_ReturnsFalse() { ILookupManager <BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var result = manager.Delete(-495); Assert.IsFalse(result); }
public void LookupManager_Delete_DeleteALookupEntityByCodeUsingAltConnectionName_DeletedSuccessfully() { ILookupManager<BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var t = manager.Create(new BusinessTypeCC2() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ9898", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete("SOMEBIZ9898", "Other"); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByCodeUsingAltConnectionName_DeletedSuccessfully() { ILookupManager <BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var t = manager.Create(new BusinessTypeCC2() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ9898", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete("SOMEBIZ9898", "Other"); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByCodes_DeletedSuccessfully() { ILookupManager<BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var t = manager.Create(new BusinessTypeCC2() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ2424", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete(new List<string>() { "SOMEBIZ2424" }); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByIds_DeletedSuccessfully() { ILookupManager <BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var t = manager.Create(new BusinessTypeCC2() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ1717", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete(all.Select(d => d.Id).Take(1).ToList()); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByCodes_DeletedSuccessfully() { ILookupManager <BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var t = manager.Create(new BusinessTypeCC2() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ2424", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete(new List <string>() { "SOMEBIZ2424" }); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByInvalidId_ReturnsFalse() { ILookupManager<BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var result = manager.Delete(-495); Assert.IsFalse(result); }
public void LookupManager_Delete_DeleteALookupEntityByIds_DeletedSuccessfully() { ILookupManager<BusinessTypeCC2> manager = new BusinessTypeCC2Manager(); var t = manager.Create(new BusinessTypeCC2() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ1717", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete(all.Select(d => d.Id).Take(1).ToList()); Assert.IsTrue(result); }