public void IChaptersAddNewCheckChapterContent() { TestInfrastructure.DebugLineStart(TestContext); if (TestInfrastructure.IsActive(TestContext)) { using (IDictionary writeLM = TestInfrastructure.GetLMConnection(TestContext, TestInfrastructure.GetAdminUser)) { List <TitleDesc> test = new List <TitleDesc>(); int numberOfTestData = 10; for (int i = 0; i < numberOfTestData; i++) { TitleDesc td = new TitleDesc(); td.title = "Chapter - " + Guid.NewGuid().ToString(); td.desc = "Description - " + Guid.NewGuid().ToString(); test.Add(td); } for (int i = 0; i < 10; i++) { IChapter chapter = writeLM.Chapters.AddNew(); chapter.Title = test[i].title; chapter.Description = test[i].desc; Assert.AreEqual <string>(chapter.Title, test[i].title, "IChapter does not save the Title to IDictionary"); Assert.AreEqual <string>(chapter.Description, test[i].desc, "IChapter does not save the Description to IDictionary"); } } } TestInfrastructure.DebugLineEnd(TestContext); }
public void IChaptersAddNewCheckChapterContent() { TestInfrastructure.DebugLineStart(TestContext); if (TestInfrastructure.IsActive(TestContext)) { using (IDictionary writeLM = TestInfrastructure.GetLMConnection(TestContext, TestInfrastructure.GetAdminUser)) { List<TitleDesc> test = new List<TitleDesc>(); int numberOfTestData = 10; for (int i = 0; i < numberOfTestData; i++) { TitleDesc td = new TitleDesc(); td.title = "Chapter - " + Guid.NewGuid().ToString(); td.desc = "Description - " + Guid.NewGuid().ToString(); test.Add(td); } for (int i = 0; i < 10; i++) { IChapter chapter = writeLM.Chapters.AddNew(); chapter.Title = test[i].title; chapter.Description = test[i].desc; Assert.AreEqual<string>(chapter.Title, test[i].title, "IChapter does not save the Title to IDictionary"); Assert.AreEqual<string>(chapter.Description, test[i].desc, "IChapter does not save the Description to IDictionary"); } } } TestInfrastructure.DebugLineEnd(TestContext); }