public void WonAmount_FieldColorDoesNotEqualBetColor_ResultEqualsZero() // test for every color combination? { //Arrange ColorBet uut = new ColorBet("Otto Leisner", 10, Field.Red); //amount = 10, color = 0 Field testField = new Field(5, Field.Black); // Number = 5, Color = 1 //Act var returnValue = uut.WonAmount(testField); //Assert Assert.AreEqual(0, returnValue); }
[Test] // red, black, green public void WonAmount_FieldColorIsGreenAndBetColorIsGreenAndAmountEquals10_ResultEquals20() { //Arrange ColorBet uut = new ColorBet("Otto Leisner", 10, Field.Green); //amount = 10, color = 0 Field testField = new Field(25, Field.Green); // Number = 25, Color = 0 //Act var returnValue = uut.WonAmount(testField); //Assert Assert.AreEqual(20, returnValue); }