Exemplo n.º 1
0
        public void Spiel_Aus_einem_Nicht_existierenden_Pfad_Starten_throws_FileNotFoundException()
        {
            var spiel = new SpieleMethoden();

            spiel.ParameterDesSpielsListe.Add(new ParameterDesSpiels()
            {
                TitelDesSpiels     = "League of Legends",
                InstallationsDatum = "17.06.2017",
                ZuletztGespielt    = "18.06.2017",
                InstallationsPfad  = @"Falscher\Pfad",
                Kategorie          = "MOBA",
                Publisher          = "Riot Games",
                UskEinstufung      = 12
            });
            spiel.SpielStarten(spiel.ParameterDesSpielsListe[0].InstallationsPfad);
        }
Exemplo n.º 2
0
        public void Spiel_Starten_TestMethod()
        {
            var spiel = new SpieleMethoden();

            spiel.ParameterDesSpielsListe.Add(new ParameterDesSpiels()
            {
                TitelDesSpiels     = "League of Legends",
                InstallationsDatum = "17.06.2017",
                ZuletztGespielt    = "18.06.2017",
                InstallationsPfad  = @"C:\League of Legends\leagueClient.exe",
                Kategorie          = "MOBA",
                Publisher          = "Riot Games",
                UskEinstufung      = 12
            });
            spiel.SpielStarten(@"C:\League of Legends\leagueClient.exe");
            Process currentProcess = Process.GetCurrentProcess();

            Assert.AreEqual("League of Legends (32 Bit)", currentProcess.StartInfo.FileName = "League of Legends (32 Bit)");
        }