Exemplo n.º 1
0
 public void NullFiltersGetEverything()
 {
     Assert.IsTrue(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         Person = new PersonSetting {
             RawName = "sam"
         }
     }, null, null));
 }
Exemplo n.º 2
0
 public void PeopleFilters()
 {
     Assert.IsTrue(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         Person = new PersonSetting {
             RawName = "bob"
         }
     }, "bob", null));
     Assert.IsFalse(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         Person = new PersonSetting {
             RawName = "bob"
         }
     }, "sam", null));
 }
Exemplo n.º 3
0
 public void BuildFilters()
 {
     Assert.IsTrue(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         NewsItemType = NewsItemTypeEnum.BuildStarted, BuildDefinitionId = "22"
     }, null, "22"));
     Assert.IsTrue(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         NewsItemType = NewsItemTypeEnum.BuildFailed, BuildDefinitionId = "22"
     }, null, "22"));
     Assert.IsFalse(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         NewsItemType = NewsItemTypeEnum.BuildStarted, BuildDefinitionId = "23"
     }, null, "22"));
     Assert.IsFalse(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         NewsItemType = NewsItemTypeEnum.BuildFailed, BuildDefinitionId = "23"
     }, null, "22"));
 }
Exemplo n.º 4
0
 public void BuildFiltersStillGetSosNews()
 {
     Assert.IsTrue(NewsFeed.IncludeInFilter(new NewNewsItemEventArgs {
         NewsItemType = NewsItemTypeEnum.SosOnlineComment, BuildDefinitionId = null
     }, null, "22"));
 }