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

            real = tfsProject.StoredQueries;
        }
        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);
        }
        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);
     }
 }
        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;
                }
            }
        }
        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);
        }