Example #1
0
        public void PriceFactorTest()
        {
            var x = new Videogame("Name", "Platform", 5, "Text", "Videogame");
            x.CurrentValue = 10;

            Assert.IsTrue(x.getValueFactor() == 2);
        }
Example #2
0
 public void NegativePrice()
 {
     Assert.Catch(() => // catch = es muss eine exception auftreten
     {
         var x = new Videogame("Name", "Platform",-14,"Zusammenfassung","Videogame");
     });
 }
Example #3
0
        public void GameCountTest()
        {
            var PreviousGameCount = Videogame.GameCount;
            var newGame = new Videogame("Name", "Platform", 5, "Text", "Videogame");

            Assert.IsTrue(Videogame.GameCount == (PreviousGameCount+1));
        }
Example #4
0
 public void EmptyPlatform()
 {
     Assert.Catch(() =>
     {
         var x = new Videogame("Name", "", 10, "Text", "Videogame");
     });
 }
Example #5
0
 public static string serializer(Videogame[] x)
 {
     return JsonConvert.SerializeObject(x,Formatting.Indented);
 }
Example #6
0
        public void PriceTest()
        {
            var x = new Videogame("Name", "Platform", 5, "Text", "Videogame");

            Assert.IsTrue(x.CurrentValue == 5);
        }