public void FilterHalfTest()
        {
            SetupStore(EndpointDirection.Source, 20);
            FileSystemWorkItemEndpoint e1 = CreateEndpoint(EndpointDirection.Source);

            SetupStore(EndpointDirection.Target, 10);
            FileSystemWorkItemEndpoint e2 = CreateEndpoint(EndpointDirection.Target);

            e1.Filter(e2.GetWorkItems());
            Assert.AreEqual(10, e1.Count);
        }
        public void FilterHalfTest()
        {
            SetupStore("Source", 20);
            FileSystemWorkItemEndpoint e1 = CreateEndpoint("Source");

            SetupStore("Target", 10);
            FileSystemWorkItemEndpoint e2 = CreateEndpoint("Target");

            e1.Filter(e2.GetWorkItems());
            Assert.AreEqual(10, e1.Count);
        }
        public void PersistWorkItemExistsTest()
        {
            SetupStore(EndpointDirection.Source, 20);
            FileSystemWorkItemEndpoint e1 = CreateEndpoint(EndpointDirection.Source);

            SetupStore(EndpointDirection.Target, 10);
            FileSystemWorkItemEndpoint e2 = CreateEndpoint(EndpointDirection.Target);

            foreach (WorkItemData item in e1.GetWorkItems())
            {
                e2.PersistWorkItem(item);
            }
            Assert.AreEqual(20, e2.Count);
        }
        public void PersistWorkItemWithFilterTest()
        {
            SetupStore("Source", 20);
            FileSystemWorkItemEndpoint e1 = CreateEndpoint("Source");

            SetupStore("Target", 10);
            FileSystemWorkItemEndpoint e2 = CreateEndpoint("Target");

            e1.Filter(e2.GetWorkItems());
            Assert.AreEqual(10, e1.Count);
            foreach (WorkItemData item in e1.GetWorkItems())
            {
                e2.PersistWorkItem(item);
            }
            Assert.AreEqual(20, e2.Count);
        }