コード例 #1
0
ファイル: TimelineDaoTest.cs プロジェクト: orelinde/CZCI
        public void TimelineDao_Update_Exception_IntegrationTest()
        {
            using (var scope = new TransactionScope())
            {
                // Arrange
                ITimelineDao target = new TimelineDao();

                // Act
                target.Update(new Timeline());
            }
        }
コード例 #2
0
ファイル: TimelineDaoTest.cs プロジェクト: orelinde/CZCI
        public void TimelineDao_Update_IntegrationTest()
        {
            using (var scope = new TransactionScope())
            {
                // Arrange
                ITimelineDao target = new TimelineDao();
                Timeline     timeline;

                using (DatabaseContext context = new DatabaseContext())
                {
                    timeline = context.FirstOrDefault <Backend.Data.MSSQL.Entities.ContentItem, Timeline>("SELECT * FROM [dbo].[ContentItem] WHERE Id=@Id", new { Id = 1 });
                }

                // Act
                target.Update(timeline);
            }
        }