Ejemplo n.º 1
0
        public static void CreateApplications()
        {
            //Create app list
            BasicAppTemplate t = new BasicAppTemplate();

            t.GenerateDefaultConfig(AppLauncher.Templates.SDKApplication.Hammer);
            AppInfo hammer = t.Info;

            t.GenerateDefaultConfig(AppLauncher.Templates.SDKApplication.HLMV);
            AppInfo hlmv = t.Info;

            t.GenerateDefaultConfig(AppLauncher.Templates.SDKApplication.FacePoser);
            AppInfo facePoser = t.Info;

            //Add apps
            List <AppInfo> Applications = new List <AppInfo>();

            Applications.Add(hammer);
            Applications.Add(hlmv);
            Applications.Add(facePoser);

            //Save apps
            DataManagers.AppManager.Objects = Applications;
            DataManagers.AppManager.Save();
        }
Ejemplo n.º 2
0
        public static void CreateApplications()
        {
            //Create app list
            BasicAppTemplate t = new BasicAppTemplate();

            t.Application = Launchers.Customizable.AppLauncher.Templates.SDKApplication.Hammer;
            AppInfo hammer = t.Info;

            t.Application = Launchers.Customizable.AppLauncher.Templates.SDKApplication.HLMV;
            AppInfo hlmv = t.Info;

            t.Application = Launchers.Customizable.AppLauncher.Templates.SDKApplication.FacePoser;
            AppInfo facePoser = t.Info;

            //Add apps
            List <AppInfo> Applications = new List <AppInfo>();

            Applications.Add(hammer);
            Applications.Add(hlmv);
            Applications.Add(facePoser);

            var converter = new AppTemplateToAppConverter();

            //Save apps
            DataManagers.AppManager.Objects = Applications
                                              .Select(x => converter.Convert(x)).ToList();
            DataManagers.AppManager.Save();
        }
        public void BasicAppTemplateSerializationTest()
        {
            var expected = new BasicAppTemplate()
            {
                Application = SDKApplication.Hammer
            };
            var actual = SerializeAndDeserialize(expected);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 4
0
        public void EqualityTest()
        {
            var template1 = new BasicAppTemplate()
            {
                Application = SDKApplication.Hammer
            };
            var template2 = new BasicAppTemplate()
            {
                Application = SDKApplication.Hammer
            };

            Assert.AreEqual(template1, template2);
        }
Ejemplo n.º 5
0
        public void DifferenceTest()
        {
            var template1 = new BasicAppTemplate()
            {
                Application = SDKApplication.Hammer
            };
            var template2 = new BasicAppTemplate()
            {
                Application = SDKApplication.HLMV
            };

            Assert.AreNotEqual(template1, template2);
        }