public bool IsAlbumRestricted(Album album) { if (album == null || album.Name == null) return true; char[] comma = { ',' }; var names = searchRuleSettings.ForbiddenAlbumNames.Split(comma); if (!names.Any() || (names.Count() ==1 && names.FirstOrDefault() == string.Empty)) return false; return searchRuleSettings.ForbiddenTrackNames != string.Empty && names.Any(s => album.Name.ToUpper().Contains(s.ToUpper())); }
public void SetUp() { album = new Album {Name = "Test Album"}; }