public void LookupManager_Get_SelectALookupEntityByIdUsingAltConnectionName_RetrievedSuccessfully() { ILookupManager <BusinessType> manager = new BusinessTypeManager(); var all = manager.Get(true); var result = manager.Get(all[0].Id, "Other"); Assert.IsTrue(result.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(result.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(result.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(result.Code)); }
public void LookupManager_Update_UpdateALookupEntity_UpdatedSuccessfully() { ILookupManager<BusinessType> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessType() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ1818", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Update(new BusinessType() { Id = all[0].Id, Name = "Some Other Business", Description = "Some Business Description 24", Code = "SOMEBIZ4546", Active = false }); Assert.IsTrue(result); }
public void LookupManager_Update_UpdateALookupEntity_UpdatedSuccessfully() { ILookupManager <BusinessType> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessType() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ1818", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Update(new BusinessType() { Id = all[0].Id, Name = "Some Other Business", Description = "Some Business Description 24", Code = "SOMEBIZ4546", Active = false }); Assert.IsTrue(result); }
public void LookupManager_Get_SelectLookupEntitiesByIdsUsingAltConnectionName_RetrievedSuccessfully() { ILookupManager <BusinessType> manager = new BusinessTypeManager(); var all = manager.Get(true); var result = manager.Get(all.Select(o => o.Id).ToList(), "Other"); Assert.IsNotNull(result); Assert.IsTrue(result.Count > 0); foreach (var r in result) { Assert.IsTrue(r.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Code)); Assert.IsTrue(r.Active); } }
public void LookupManager_Get_SelectAllLookupsUsingAltConnectionName_RetrievedSuccessfully() { ILookupManager <BusinessType> manager = new BusinessTypeManager(); var result = manager.Get(false, "Other"); Assert.IsNotNull(result); Assert.IsTrue(result.Count > 0); foreach (var r in result) { Assert.IsTrue(r.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Code)); } }
public void LookupManager_Get_SelectAllLookups_RetrievedSuccessfully() { ILookupManager<BusinessType> manager = new BusinessTypeManager(); var result = manager.Get(false); Assert.IsNotNull(result); Assert.IsTrue(result.Count > 0); foreach (var r in result) { Assert.IsTrue(r.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Code)); } }
public void LookupManager_Get_SelectAllActiveLookupsUsingAltConnectionName_RetrievedSuccessfully() { ILookupManager<BusinessTypeCC> manager = new BusinessTypeManager(); var result = manager.Get(true, "Other"); Assert.IsNotNull(result); Assert.IsTrue(result.Count > 0); foreach (var r in result) { Assert.IsTrue(r.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Code)); Assert.IsTrue(r.Active); } }
public void LookupManager_Get_SelectAllActiveLookups_RetrievedSuccessfully() { ILookupManager <BusinessTypeCC> manager = new BusinessTypeManager(); var result = manager.Get(true); Assert.IsNotNull(result); Assert.IsTrue(result.Count > 0); foreach (var r in result) { Assert.IsTrue(r.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Code)); Assert.IsTrue(r.Active); } }
public void LookupManager_Delete_DeleteALookupEntityByCodeUsingAltConnectionName_DeletedSuccessfully() { ILookupManager<BusinessType> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessType() { 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 <BusinessTypeCC> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessTypeCC() { 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_DeleteALookupEntityByIds_DeletedSuccessfully() { ILookupManager <BusinessTypeCC> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessTypeCC() { 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_DeleteALookupEntityById_DeletedSuccessfully() { ILookupManager <BusinessType> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessType() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ1919", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete(all[0].Id); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByCodes_DeletedSuccessfully() { ILookupManager<BusinessType> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessType() { 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_DeleteALookupEntityByCodes_DeletedSuccessfully() { ILookupManager <BusinessTypeCC> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessTypeCC() { 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_Get_SelectLookupEntitiesByIds_RetrievedSuccessfully() { ILookupManager<BusinessTypeCC> manager = new BusinessTypeManager(); var all = manager.Get(true); var result = manager.Get(all.Select(o => o.Id).ToList()); Assert.IsNotNull(result); Assert.IsTrue(result.Count > 0); foreach (var r in result) { Assert.IsTrue(r.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(r.Code)); Assert.IsTrue(r.Active); } }
public void LookupManager_Get_SelectALookupEntityByCodeUsingAltConnectionName_RetrievedSuccessfully() { ILookupManager<BusinessTypeCC> manager = new BusinessTypeManager(); var all = manager.Get(true); var result = manager.Get(all[0].Code, "Other"); Assert.IsTrue(result.Id > 0); Assert.IsTrue(!string.IsNullOrWhiteSpace(result.Name)); Assert.IsTrue(!string.IsNullOrWhiteSpace(result.Description)); Assert.IsTrue(!string.IsNullOrWhiteSpace(result.Code)); Assert.IsTrue(result.Active); }
public void LookupManager_Delete_DeleteALookupEntityById_DeletedSuccessfully() { ILookupManager<BusinessTypeCC> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessTypeCC() { Name = "Some Business", Description = "Some Business Description", Code = "SOMEBIZ1919", Active = true }); Assert.IsTrue(t); var all = manager.Get(false); var result = manager.Delete(all[0].Id); Assert.IsTrue(result); }
public void LookupManager_Delete_DeleteALookupEntityByIds_DeletedSuccessfully() { ILookupManager<BusinessType> manager = new BusinessTypeManager(); var t = manager.Create(new BusinessType() { 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); }