Commits

Bogdan Varlamov  committed a4bed97

updating unit tests after rethinking the way seo urls would work

  • Participants
  • Parent commits 895956c

Comments (0)

Files changed (1)

File development/src/Tests/PostLogicTest.cs

         #region Individual Post Operations
 
         /// <summary>
-        /// is a post returned based on the unique seo url?
+        /// is a post returned based on it's unique id?
         /// </summary>
         [TestMethod()]
-        public void CanFindPostBySeoUrl()
+        public void CanFindPostById()
         {
             Assert.Inconclusive();
         }
         #region Helper Operations
 
         /// <summary>
-        /// is a generated seo url really unique?
+        /// is the generated SEO url too long?
         /// </summary>
         [TestMethod()]
-        public void GeneratedSeoUrlIsUnique()
+        public void GeneratedSeoUrlNotTooLong()
+        {
+            Assert.Inconclusive();
+
+        }
+
+        /// <summary>
+        /// makes sure that the generated SEO url doesn't have filler words like "the" and "in" and etc.
+        /// </summary>
+        [TestMethod()]
+        public void GeneratedSeoUrlLackFillerWords()
         {
             Assert.Inconclusive();
-            //TODO: need more consideration on the best way to make a unique URL
-            // and whether all of that needs to be stored in the field or not
-            //
-            // stackoverflow URLS look like this: 
-            // questions/15128146/uitabbarcontroller-containing-uisplitviewcontroller-doesnt-handle-rotation-on-i
-            // seemingly following the pattern:
-            // {controller}/{id}/{seo-suffix}
-            // where the int ID is probably the primary key in the DB
-            // if i do the same pattern here, it might look something like this:
-            // questions/F52BD50C-E9A5-4B5E-962C-39FA595FB4BA/uitabbarcontroller-containing-uisplitviewcontroller-doesnt-handle-rotation-on-i
-            // problem: takes up way more space, URLS are limited
-            // does this matter?
-            //if done this way, the seo-url doesn't need to be unique or used to get data on the posts as the pkid is in the full URL
-            // other options:
-            // questions/1362029760/bogdanvarlamov/uitabbarcontroller-containing-uisplitviewcontroller-doesnt-handle-rotation-on-i
-            // pattern: {controller}/{UTC ticks}/{user}/{seo suffix}
-            // not much shorter than the guid, more work to lookup in DB :\
-            // the guid-url in the example is 126 chars long. I think the URL limit is like 255 chars, so still plenty left for domain prefixes and such
-            // what's a sensible limit to the seo-suffix?
         }
 
         #endregion //Helper Operations