コード例 #1
0
        static partial void RealInstanceFactory(ref StoredQueryCollection real, string callerName)
        {
            var     store      = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            Project tfsProject = store.Projects["RestPlaypen"];

            real = tfsProject.StoredQueries;
        }
コード例 #2
0
        static partial void RealInstanceFactory(ref WorkItemCollection real, string callerName)
        {
            var          store = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            const string wiql  = "SELECT * FROM WorkItems WHERE [System.TeamProject] = 'RestPlaypen' ORDER BY [System.Id] ";

            real = store.Query(wiql);
        }
コード例 #3
0
        /// <summary>
        ///     Gets the real instance.
        /// </summary>
        /// <returns>WorkItemLinkCollection.</returns>
        public static WorkItemLinkCollection GetRealInstance()
        {
            WorkItemStore workItemStore = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            WorkItem      workitem      = workItemStore.GetWorkItem(195);

            return(workitem.WorkItemLinkHistory);
        }
コード例 #4
0
        internal static ProjectCollection GetRealInstance()
        {
            ProjectCollection real;
            WorkItemStore     workItemStore = WorkItemStoreWrapper_UnitTests.GetRealInstance();

            real = workItemStore.Projects;
            return(real);
        }
コード例 #5
0
        static partial void RealInstanceFactory(ref CancelableAsyncResult real, string callerName)
        {
            var          store = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            const string wiql  = "SELECT * FROM WorkItems WHERE [System.TeamProject] = 'RestPlaypen' ORDER BY [System.Id] ";
            var          query = new Query(store, wiql);

            real = (CancelableAsyncResult)query.BeginLinkQuery();
        }
コード例 #6
0
        internal static WorkItemTypeCollection GetRealInstance()
        {
            WorkItemStore          workItemStore = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            Project                teamProject   = workItemStore.Projects["RestPlaypen"];
            WorkItemTypeCollection real          = teamProject.WorkItemTypes;

            return(real);
        }
コード例 #7
0
        static partial void RealInstanceFactory(ref Node real, string callerName)
        {
            WorkItemStore  workItemStore = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            Project        project       = ProjectWrapper_UnitTests.GetRealInstance();
            NodeCollection areas         = project.AreaRootNodes;
            Node           firstArea     = areas[0];

            real = firstArea;
        }
コード例 #8
0
 static partial void InstanceFactory(ref QueryWrapper instance, string callerName)
 {
     if ((callerName == "RunLinkQuery_UnitTest") || (callerName == "EndLinkQuery_UnitTest"))
     {
         WorkItemStore store = WorkItemStoreWrapper_UnitTests.GetRealInstance();
         const string  wiql  = "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.Tags] FROM WorkItemLinks WHERE ([Source].[System.TeamProject] = 'RestPlaypen'  AND  [Source].[System.WorkItemType] <> ''  AND  [Source].[System.State] <> '') And ([System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward') And ([Target].[System.WorkItemType] <> '') ORDER BY [System.Id] mode(Recursive)";
         var           real  = new Query(store, wiql);
         instance = (QueryWrapper)QueryWrapper.GetWrapper(real);
     }
 }
コード例 #9
0
 static partial void InstanceFactory(ref WorkItemWrapper instance, string callerName)
 {
     if (callerName == "SyncWorkItem_UnitTest")
     {
         var          store     = WorkItemStoreWrapper_UnitTests.GetRealInstance();
         const string wiql      = "SELECT * FROM WorkItems WHERE [System.TeamProject] = 'RestPlaypen' ORDER BY [System.Id] ";
         var          workItems = store.Query(wiql);
         var          workItem  = workItems[0];
         instance = (WorkItemWrapper)WorkItemWrapper.GetWrapper(workItem);
     }
 }
コード例 #10
0
        static partial void RealInstanceFactory(ref RelatedLink real, string callerName)
        {
            WorkItemStore  workItemStore = WorkItemStoreWrapper_UnitTests.GetRealInstance();
            WorkItem       workitem      = workItemStore.GetWorkItem(195);
            LinkCollection links         = workitem.Links;

            foreach (object link in links)
            {
                if (link is RelatedLink)
                {
                    real = (RelatedLink)link;
                }
            }
        }
コード例 #11
0
        static partial void RealInstanceFactory(ref QueryHierarchyProvider real, string callerName)
        {
            WorkItemStore store = WorkItemStoreWrapper_UnitTests.GetRealInstance();

            real = new QueryHierarchyProvider(store);
        }
コード例 #12
0
        /// <summary>
        /// Gets the real instance.
        /// </summary>
        /// <returns>WorkItemLinkType.</returns>
        public static WorkItemLinkType GetRealInstance()
        {
            var workItemStore = WorkItemStoreWrapper_UnitTests.GetRealInstance();

            return(workItemStore.WorkItemLinkTypes["System.LinkTypes.Related"]);
        }
        static partial void RealInstanceFactory(ref FieldDefinitionCollection real, string callerName)
        {
            var store = WorkItemStoreWrapper_UnitTests.GetRealInstance();

            real = new FieldDefinitionCollection(store, false);
        }