public void PriceFactorTest() { var x = new Videogame("Name", "Platform", 5, "Text", "Videogame"); x.CurrentValue = 10; Assert.IsTrue(x.getValueFactor() == 2); }
public void NegativePrice() { Assert.Catch(() => // catch = es muss eine exception auftreten { var x = new Videogame("Name", "Platform",-14,"Zusammenfassung","Videogame"); }); }
public void GameCountTest() { var PreviousGameCount = Videogame.GameCount; var newGame = new Videogame("Name", "Platform", 5, "Text", "Videogame"); Assert.IsTrue(Videogame.GameCount == (PreviousGameCount+1)); }
public void EmptyPlatform() { Assert.Catch(() => { var x = new Videogame("Name", "", 10, "Text", "Videogame"); }); }
public static string serializer(Videogame[] x) { return JsonConvert.SerializeObject(x,Formatting.Indented); }
public void PriceTest() { var x = new Videogame("Name", "Platform", 5, "Text", "Videogame"); Assert.IsTrue(x.CurrentValue == 5); }