Exemplo n.º 1
0
        public void ContentItemDao_Update_Exception_IntegrationTest()
        {
            using (var scope = new TransactionScope())
            {
                // Arrange
                IContentItemDao target = new ContentItemDao();

                // Act
                target.Update(new ContentItem());
            }
        }
Exemplo n.º 2
0
        public void ContentItemDao_Find_IntegrationTest()
        {
            // Arrange
            IContentItemDao target = new ContentItemDao();

            // Act
            ContentItem result = target.Find(18, 1);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(7, result.Children.Count());
            Assert.AreEqual(0, result.Children[0].Children.Count());
            Assert.AreEqual(0, result.Children[1].Children.Count());
        }
Exemplo n.º 3
0
        public void ContentItemDao_Add_IntegrationTest()
        {
            using (var scope = new TransactionScope())
            {
                // Arrange
                IContentItemDao target = new ContentItemDao();

                // Act
                ContentItem result = target.Add(new ContentItem()
                {
                    BeginDate = 1900,
                    EndDate = 2000,
                    Title = "Test",
                    ParentId = 1
                });

                // Assert
                Assert.IsTrue(result.Id != 0);
            }
        }