Ejemplo n.º 1
0
        public void TestGetUnitRefreshOne()
        {
            var profiles = new Excellence(new MockClient(Resources.LearningPathTechnicianLevel2,
                                                         Resources.ModuleRevision1), "user1").GetUnitRefresh();

            Assert.AreEqual(1, profiles.Count());
            var competencies = profiles.First().Competencies;

            Assert.AreEqual(1, competencies.Count());
            Assert.IsTrue(competencies.First().Modules.Any());
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Create generic API client instance
            Client client = Client.From(args[0], new NetworkCredential(args[1], args[2]), args[3]);

            // Create Excellence wrapper
            string     assignmentId = args[4];
            Excellence ex           = new Excellence(client, assignmentId);

            // Get the expanded learning path, and do something with it
            learningPath path = ex.GetExpandedLearningPath();

            foreach (jobProfile p in path.jobProfile)
            {
                foreach (competency c in p.competency)
                {
                    if (c.sequence != null)
                    {
                        foreach (sequence s in c.sequence)
                        {
                            foreach (item i in s.item)
                            {
                                // This could be an unenrolled program
                                if (i.sequence != null)
                                {
                                    foreach (sequence s2 in i.sequence)
                                    {
                                        foreach (item i2 in s2.item)
                                        {
                                            Console.WriteLine("Submodule: {0}", i2.module.title);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            Console.ReadKey();
        }