示例#1
0
        public void TestPersistNewWorkItem()
        {
            IWorkItemMigrationClient sink = new WorkItemMigrationClientMock();

            sink.PersistWorkItem(new WorkItemData {
                Title = "Item 6"
            });
            //
            var list = sink.GetWorkItems();

            Assert.IsTrue(list.Count() == 6);
        }
示例#2
0
        public void TestpersistExistingItem()
        {
            IWorkItemMigrationClient sink = new WorkItemMigrationClientMock();
            var workItem = sink.GetWorkItems().First();

            workItem.Title = "New Title";
            sink.PersistWorkItem(workItem);
            //
            var list = sink.GetWorkItems();

            Assert.IsTrue(list.Count() == 5);
            var updatedworkItem = sink.GetWorkItems().First();

            Assert.IsTrue(updatedworkItem.Title == workItem.Title);
        }