public void GlobalList_get_Succeeded()
        {
            var repository = new WorkItemRepositoryMock();

            var gl = repository.GetGlobalList("Aggregator - UserParameters").ToArray();

            Assert.IsNotNull(gl);
            Assert.AreEqual(1, gl.Length);
            Assert.AreEqual("myParameter=30", gl[0]);
        }
Esempio n. 2
0
        public void GlobalList_Remove_Succeeded()
        {
            const string globalListName = "Aggregator - UserParameters";
            const string testItem       = "myParameter=30";
            var          repository     = new WorkItemRepositoryMock(DefaultGlobalLists);

            repository.RemoveItemFromGlobalList(globalListName, testItem);

            var gl = repository.GetGlobalList(globalListName).ToArray();

            Assert.IsNotNull(gl);
            Assert.AreEqual(0, gl.Length);
        }
Esempio n. 3
0
        public void GlobalList_RemoveNonExistingList_Succeeded()
        {
            const string globalListName = "Aggregator - DoesNotExists";
            const string testItem       = "anything";
            var          repository     = new WorkItemRepositoryMock(DefaultGlobalLists);

            repository.RemoveItemFromGlobalList(globalListName, testItem);

            var gl = repository.GetGlobalList(globalListName).ToArray();

            Assert.IsNotNull(gl);
            Assert.AreEqual(0, gl.Length);
        }
Esempio n. 4
0
        public void GlobalList_AddNonExistingList_Succeeded()
        {
            const string globalListName = "Aggregator - DoesNotExists";
            const string testItem       = "A new item";
            var          repository     = new WorkItemRepositoryMock(DefaultGlobalLists);

            repository.AddItemToGlobalList(globalListName, testItem);

            var gl = repository.GetGlobalList(globalListName).ToArray();

            Assert.IsNotNull(gl);
            Assert.AreEqual(1, gl.Length);
            Assert.AreEqual(testItem, gl[0]);
        }