Esempio n. 1
0
        static void Main()
        {
            ComputerInfo ci = new ComputerInfo();

            ci.CpuFreq     = 2000;
            ci.GpuMem      = 512;
            ci.RamCapacity = 4096;
            ci.OSType      = "Windows 7 x64";

            AppManager am = new AppManager(ci);

            Application.EnableVisualStyles();

            Application.SetCompatibleTextRenderingDefault(false);

            Form main_form = new Forms.MainForm(am);

            Application.Run(main_form);
        }
Esempio n. 2
0
        public void TestUpdate()
        {
            App app = GetAppInstance();

            Version start_version = new Version(1, 0);

            ComputerInfo start_req = new ComputerInfo();

            start_req.CpuFreq     = 1;
            start_req.GpuMem      = 512;
            start_req.RamCapacity = 1024;

            app.MinRequirements = start_req;
            app.AppVersion      = start_version;

            app.Update();

            Assert.IsTrue(app.MinRequirements.CpuFreq > start_req.CpuFreq);
            Assert.IsTrue(app.MinRequirements.GpuMem > start_req.GpuMem);
            Assert.IsTrue(app.MinRequirements.RamCapacity > start_req.RamCapacity);
            Assert.IsTrue(app.AppVersion > start_version);
        }