public void GetAppliedTags_NullEntityNameAndKey_Exception() { var target = new AppliedTagService(); ExceptionAssert.IsThrowing(new ArgumentNullException("entityName"), () => { target.GetAppliedTags(null, 1); }); ExceptionAssert.IsThrowing(new ArgumentNullException("entityName"), () => { target.GetAppliedTags("", 1); }); }
public void GetAppliedTags_NullOrEmptyEntityName_Exception() { var target = new AppliedTagService(); ExceptionAssert.IsThrowing(new ArgumentNullException("entityName"), () => { target.GetAppliedTags((string)null); }); ExceptionAssert.IsThrowing(new ArgumentNullException("entityName"), () => { target.GetAppliedTags(""); }); }
public void GetAppliedTags_NullEntity_Exception() { var target = new AppliedTagService(); ExceptionAssert.IsThrowing(new ArgumentNullException("entity"), () => { target.GetAppliedTags((IEntity <long>)null); }); }
public void GetAppliedTags_DoesNotExistsEntityWithName_Exception() { var target = new AppliedTagService(); ExceptionAssert.IsThrowing(new ArgumentException("There is no entity with the name 'Jogo'."), () => { target.GetAppliedTags("Jogo", 1); }); }
/// <summary> /// Gets the applied tags by entity name and key. /// </summary> /// <returns>The by entity.</returns> /// <param name="entityName">Entity name.</param> /// <param name="entityKey">Entity key.</param> public IEnumerable <AppliedTag> GetByEntity(string entityName, long entityKey) { var service = new AppliedTagService(); return(service.GetAppliedTags(entityName, entityKey)); }