public void BuildSearchesUrlTest()
 {
     SavedSearchRequestProcessor<SavedSearch> target = new SavedSearchRequestProcessor<SavedSearch>() { BaseUrl = "http://twitter.com/" };
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
         {
             { "Type", SavedSearchType.Searches.ToString() }
         };
     string expected = "http://twitter.com/saved_searches.xml";
     string actual = target.BuildURL(parameters);
     Assert.AreEqual(expected, actual);
 }
Exemple #2
0
        public void BuildSearchesUrlTest()
        {
            SavedSearchRequestProcessor <SavedSearch> target = new SavedSearchRequestProcessor <SavedSearch>()
            {
                BaseUrl = "http://twitter.com/"
            };
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", SavedSearchType.Searches.ToString() }
            };
            string expected = "http://twitter.com/saved_searches.xml";
            string actual   = target.BuildURL(parameters);

            Assert.AreEqual(expected, actual);
        }
Exemple #3
0
        public void NullParametersTest()
        {
            SavedSearchRequestProcessor <SavedSearch> target = new SavedSearchRequestProcessor <SavedSearch>()
            {
                BaseUrl = "http://twitter.com/"
            };
            Dictionary <string, string> parameters = null;
            string actual;

            try
            {
                actual = target.BuildURL(parameters);
                Assert.Fail("Expected ArgumentException.");
            }
            catch (ArgumentException ae)
            {
                Assert.AreEqual <string>("Type", ae.ParamName);
            }
        }
 public void NullParametersTest()
 {
     SavedSearchRequestProcessor<SavedSearch> target = new SavedSearchRequestProcessor<SavedSearch>() { BaseUrl = "http://twitter.com/" };
     Dictionary<string, string> parameters = null;
     string actual;
     try
     {
         actual = target.BuildURL(parameters);
         Assert.Fail("Expected ArgumentException.");
     }
     catch (ArgumentException ae)
     {
         Assert.AreEqual<string>("Type", ae.ParamName);
     }
 }