From: <ha...@us...> - 2006-07-06 23:55:42
|
Revision: 1261 Author: haacked Date: 2006-07-06 16:55:37 -0700 (Thu, 06 Jul 2006) ViewCVS: http://svn.sourceforge.net/subtext/?rev=1261&view=rev Log Message: ----------- Fixed some unit tests I inadverdently broke. All seem to be passing. Modified Paths: -------------- trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/AutoGenerateFriendlyUrlTests.cs trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryCreationTests.cs trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryUpdateTests.cs trunk/SubtextSolution/UnitTests.Subtext/Framework/Syndication/RssHandlerTests.cs Modified: trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/AutoGenerateFriendlyUrlTests.cs =================================================================== --- trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/AutoGenerateFriendlyUrlTests.cs 2006-07-06 23:47:08 UTC (rev 1260) +++ trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/AutoGenerateFriendlyUrlTests.cs 2006-07-06 23:55:37 UTC (rev 1261) @@ -162,7 +162,7 @@ entry.Body = "Some Body"; int id = Entries.Create(entry); - Entry savedEntry = Entries.GetEntry(id, PostConfig.IsActive, false); + Entry savedEntry = Entries.GetEntry(id, PostConfig.None, false); Assert.AreEqual("Some_Title", savedEntry.EntryName, "The EntryName should have been auto-friendlied."); Assert.AreEqual(savedEntry.Url, savedEntry.TitleUrl, "The title url should link to the entry."); @@ -172,7 +172,7 @@ duplicate.Title = "Some Title"; duplicate.Body = "Some Body"; int dupeId = Entries.Create(duplicate); - Entry savedDupe = Entries.GetEntry(dupeId, PostConfig.IsActive, false); + Entry savedDupe = Entries.GetEntry(dupeId, PostConfig.None, false); Assert.AreEqual("Some_TitleAgain", savedDupe.EntryName, "Should have appended 'Again'"); UnitTestHelper.AssertAreNotEqual(savedEntry.EntryName, savedDupe.EntryName, "No duplicate entry names are allowed."); @@ -183,7 +183,7 @@ yetAnotherDuplicate.Title = "Some Title"; yetAnotherDuplicate.Body = "Some Body"; dupeId = Entries.Create(yetAnotherDuplicate); - savedDupe = Entries.GetEntry(dupeId, PostConfig.IsActive, false); + savedDupe = Entries.GetEntry(dupeId, PostConfig.None, false); Assert.AreEqual("Some_TitleYetAgain", savedDupe.EntryName, "Should have appended 'YetAgain'"); @@ -193,7 +193,7 @@ yetAnotherDuplicate.Title = "Some Title"; yetAnotherDuplicate.Body = "Some Body"; dupeId = Entries.Create(yetAnotherDuplicate); - savedDupe = Entries.GetEntry(dupeId, PostConfig.IsActive, false); + savedDupe = Entries.GetEntry(dupeId, PostConfig.None, false); Assert.AreEqual("Some_TitleAndAgain", savedDupe.EntryName, "Should have appended 'AndAgain'"); @@ -203,7 +203,7 @@ yetAnotherDuplicate.Title = "Some Title"; yetAnotherDuplicate.Body = "Some Body"; dupeId = Entries.Create(yetAnotherDuplicate); - savedDupe = Entries.GetEntry(dupeId, PostConfig.IsActive, false); + savedDupe = Entries.GetEntry(dupeId, PostConfig.None, false); Assert.AreEqual("Some_TitleOnceMore", savedDupe.EntryName, "Should have appended 'OnceMore'"); @@ -213,7 +213,7 @@ yetAnotherDuplicate.Title = "Some Title"; yetAnotherDuplicate.Body = "Some Body"; dupeId = Entries.Create(yetAnotherDuplicate); - savedDupe = Entries.GetEntry(dupeId, PostConfig.IsActive, false); + savedDupe = Entries.GetEntry(dupeId, PostConfig.None, false); Assert.AreEqual("Some_TitleToBeatADeadHorse", savedDupe.EntryName, "Should have appended 'ToBeatADeadHorse'"); } Modified: trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryCreationTests.cs =================================================================== --- trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryCreationTests.cs 2006-07-06 23:47:08 UTC (rev 1260) +++ trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryCreationTests.cs 2006-07-06 23:55:37 UTC (rev 1261) @@ -58,7 +58,7 @@ string expectedLink = string.Format("{0}/archive/2005/01/23/{1}.aspx", expectedUrlPrefix, id); string expectedFullyQualifiedLink = "http://" + hostname + expectedLink; - Entry savedEntry = Entries.GetEntry(id, PostConfig.IsActive, false); + Entry savedEntry = Entries.GetEntry(id, PostConfig.None, false); Assert.AreEqual(savedEntry.Url, expectedLink, "The link was not what we expected."); Assert.AreEqual(savedEntry.FullyQualifiedUrl, expectedFullyQualifiedLink, "The link was not what we expected."); } @@ -79,7 +79,7 @@ entry.Body = "Some Body"; int id = Entries.Create(entry); - Entry savedEntry = Entries.GetEntry(id, PostConfig.IsActive, false); + Entry savedEntry = Entries.GetEntry(id, PostConfig.None, false); Assert.IsTrue(savedEntry.ContentChecksumHash.Length > 0, "The Content Checksum should be larger than 0."); } @@ -97,7 +97,7 @@ entry.Body = "Some Body"; int id = Entries.Create(entry); - Entry savedEntry = Entries.GetEntry(id, PostConfig.IsActive, false); + Entry savedEntry = Entries.GetEntry(id, PostConfig.None, false); Assert.AreEqual(NullValue.NullDateTime, savedEntry.DateSyndicated, "DateSyndicated should be null since it was not syndicated."); @@ -107,8 +107,8 @@ Entries.Update(savedEntry); Assert.IsTrue(savedEntry.DateSyndicated > savedEntry.DateCreated, string.Format("DateSyndicated '{0}' should larger than date created '{1}'.", savedEntry.DateSyndicated, savedEntry.DateCreated)); - - savedEntry = Entries.GetEntry(id, PostConfig.IsActive, false); + + savedEntry = Entries.GetEntry(id, PostConfig.None, false); Assert.IsTrue(savedEntry.DateSyndicated > savedEntry.DateCreated, string.Format("After reloading from DB, DateSyndicated '{0}' should larger than date created '{1}'.", savedEntry.DateSyndicated, savedEntry.DateCreated)); } Modified: trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryUpdateTests.cs =================================================================== --- trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryUpdateTests.cs 2006-07-06 23:47:08 UTC (rev 1260) +++ trunk/SubtextSolution/UnitTests.Subtext/Framework/Components/EntryTests/EntryUpdateTests.cs 2006-07-06 23:55:37 UTC (rev 1261) @@ -36,7 +36,7 @@ //Ok, update and make sure these changes persist. Entries.Update(entry); - Entry savedEntry = Entries.GetEntry(entry.Id, PostConfig.IsActive, false); + Entry savedEntry = Entries.GetEntry(entry.Id, PostConfig.None, false); Assert.IsFalse(savedEntry.IncludeInMainSyndication, "This item should still not be included in main syndication."); int allowableMarginOfError = 1; //ms Assert.IsTrue((savedEntry.DateSyndicated - entry.DateSyndicated).Milliseconds <= allowableMarginOfError, "The DateSyndicated was not stored in the db."); @@ -47,7 +47,7 @@ savedEntry.IncludeInMainSyndication = true; Assert.IsTrue(savedEntry.DateSyndicated >= date, "The DateSyndicated '{0}' should be updated to be later than '{1}.", savedEntry.DateSyndicated, date); Entries.Update(savedEntry); - savedEntry = Entries.GetEntry(entry.Id, PostConfig.IsActive, false); + savedEntry = Entries.GetEntry(entry.Id, PostConfig.None, false); Assert.IsTrue(savedEntry.DateSyndicated >= date, "The DateSyndicated '{0}' should be updated to be later than '{1}.", savedEntry.DateSyndicated, date); } Modified: trunk/SubtextSolution/UnitTests.Subtext/Framework/Syndication/RssHandlerTests.cs =================================================================== --- trunk/SubtextSolution/UnitTests.Subtext/Framework/Syndication/RssHandlerTests.cs 2006-07-06 23:47:08 UTC (rev 1260) +++ trunk/SubtextSolution/UnitTests.Subtext/Framework/Syndication/RssHandlerTests.cs 2006-07-06 23:55:37 UTC (rev 1261) @@ -97,7 +97,7 @@ //Create two entries, but only include one in main syndication. Entries.Create(UnitTestHelper.CreateEntryInstanceForSyndication("Haacked", "Title Test", "Body Rocking")); int id = Entries.Create(UnitTestHelper.CreateEntryInstanceForSyndication("Haacked", "Title Test 2", "Body Rocking Pt 2")); - Entry entry = Entries.GetEntry(id, PostConfig.IsActive, false); + Entry entry = Entries.GetEntry(id, PostConfig.None, false); entry.IncludeInMainSyndication = false; Entries.Update(entry); Assert.AreEqual(NullValue.NullDateTime, entry.DateSyndicated); @@ -145,7 +145,7 @@ Assert.AreEqual("Title Test", itemNodes[1].SelectSingleNode("title").InnerText, "Not what we expected for the second title."); //Remove first entry from syndication. - Entry firstEntry = Entries.GetEntry(firstId, PostConfig.IsActive, false); + Entry firstEntry = Entries.GetEntry(firstId, PostConfig.None, false); firstEntry.IncludeInMainSyndication = false; Entries.Update(firstEntry); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |