public void MissedShotShownCorrectly() { shotPoint.Setup(_ => _.X).Returns(0); shotPoint.Setup(_ => _.Y).Returns(1); using (StringWriter sw = new StringWriter()) { Console.SetOut(sw); presenter.ShowHitResult(shotPoint.Object, false, false); string expected = string.Format($"Your shot at A2 missed{Environment.NewLine}"); Assert.AreEqual <string>(expected, sw.ToString()); } }