public string FuehreAus(IScorecard scorecard) { scorecard.ErhoeheAnzahlSchlaege(); return(string.Format("Du hast {0} {1}.", new Schlagausgabe().FuehreAus(scorecard), new Lochausgabe().FuehreAus(scorecard))); }
public void ScoreCard_ZeilenAusgabe() { _scorecard.ErhoeheAnzahlSchlaege(); _scorecard.SchliesseLochAb(); string resultText = new ScorecardOperation().FuehreAus(_scorecard); var lines = resultText.Split(new[] { Environment.NewLine }, StringSplitOptions.None); var secondLine = lines[1]; secondLine = secondLine.Replace(" ", string.Empty); Assert.That(secondLine.StartsWith("1") && secondLine.EndsWith("1"), "Loch und Anzahl ist wrong"); var thirdLine = lines[2]; thirdLine = thirdLine.Replace(" ", string.Empty); Assert.That(thirdLine.StartsWith("2") && thirdLine.EndsWith("0"), "Loch und Anzahl ist wrong"); }
public void InkrementiertSchlagzahlEinmal() { _scorecard.ErhoeheAnzahlSchlaege(); Assert.That(_scorecard.AnzahlSchlaege, Is.EqualTo(1)); }
public string FuehreAus(IScorecard scorecard, ITracker tracker) { scorecard.ErhoeheAnzahlSchlaege(); return(""); }