Example #1
0
        public bool PinnedWebPagesShouldNotBeFilteredWhenSearchingForThem(string query, int scenario)
        {
            const int CASE_TWITTER            = 0;
            const int CASE_WEB_PAGE           = 1;
            const int CASE_EDGE_NAMED_WEBPAGE = 2;

            // If the query is a part of the name of the web application, it should not be filtered,
            // even if the name is the same as that of the main application, eg: case 2 - edge
            switch (scenario)
            {
            case CASE_TWITTER:
                return(_twitterChromePwa.FilterWebApplication(query));

            case CASE_WEB_PAGE:
                return(_pinnedWebpage.FilterWebApplication(query));

            case CASE_EDGE_NAMED_WEBPAGE:
                return(_edgeNamedPinnedWebpage.FilterWebApplication(query));

            default:
                break;
            }

            // unreachable code
            return(true);
        }
Example #2
0
        public bool PinnedWebPages_ShouldNotBeFiltered_WhenSearchingForThem(string query, int Case)
        {
            const uint CASE_TWITTER            = 0;
            const uint CASE_WEB_PAGE           = 1;
            const uint CASE_EDGE_NAMED_WEBPAGE = 2;

            // If the query is a part of the name of the web application, it should not be filtered,
            // even if the name is the same as that of the main application, eg: case 2 - edge
            if (Case == CASE_TWITTER)
            {
                return(twitter_pwa.FilterWebApplication(query));
            }
            else if (Case == CASE_WEB_PAGE)
            {
                return(pinned_webpage.FilterWebApplication(query));
            }
            else if (Case == CASE_EDGE_NAMED_WEBPAGE)
            {
                return(edge_named_pinned_webpage.FilterWebApplication(query));
            }
            // unreachable code
            return(true);
        }
Example #3
0
 public bool ChromeWebSitesShouldBeFilteredWhenSearchingForChrome(string query)
 {
     return(_twitterChromePwa.FilterWebApplication(query));
 }
Example #4
0
 public bool EdgeWebSitesShouldBeFilteredWhenSearchingForEdge(string query)
 {
     return(_pinnedWebpage.FilterWebApplication(query));
 }
Example #5
0
 public void FunctionFilterWebApplicationShouldReturnFalseWhenSearchingForTheMainApp(string query)
 {
     // Irrespective of the query, the FilterWebApplication() Function must not filter main apps such as edge and chrome
     Assert.IsFalse(_msedge.FilterWebApplication(query));
     Assert.IsFalse(_chrome.FilterWebApplication(query));
 }