public void ShouldReturnCompleteWhenThereAreTwoThrowsAndNotASpare()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(8);
     tensFrame.Throw(1);
     Assert.IsTrue(tensFrame.IsComplete);
 }
 public void ShouldNotAddThirdThrow_WhenFirstTwoNotSpare()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(1);
     tensFrame.Throw(1);
     tensFrame.Throw(10);
 }
 public void ShouldAddThirdThrow_WhenFirstOneIsStrike()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(10);
     tensFrame.Throw(9);
     tensFrame.Throw(0);
 }
 public void ShouldAddThirdThrow_WhenFirstTwoAreStrikes()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(10);
     tensFrame.Throw(10);
     tensFrame.Throw(10);
 }   
 public void ShouldReturnCompleteWhenThereAreThreeThrows()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(9);
     tensFrame.Throw(1);
     tensFrame.Throw(1);
     Assert.IsTrue(tensFrame.IsComplete);
 }
 public void ShouldReturnTheScore()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(9);
     tensFrame.Throw(1);
     Assert.AreEqual(tensFrame.FirstThrow, 9);
     Assert.AreEqual(tensFrame.SecondThrow, 1);
 }
 public void ShouldOnlySupportUptoThreeThrows()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(9);
     tensFrame.Throw(1);
     tensFrame.Throw(10);
     tensFrame.Throw(10);
 }
 public void ShouldReturnIncompleteWhenThereIsOnlyOneThrow()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(8);
     Assert.IsFalse(tensFrame.IsComplete);
 }
 public void ShouldReturnIncompleteWhenThereAreTwoThrowsAndIsASpare()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(8);
     tensFrame.Throw(2);
     Assert.IsFalse(tensFrame.IsComplete);
 }
Exemple #10
0
 public void ShouldReturnIncompleteWhenThereAreTwoThrowAndThisFirstOneIsAStrike()
 {
     var tensFrame = new TensFrame();
     tensFrame.Throw(10);
     tensFrame.Throw(8);
     Assert.IsFalse(tensFrame.IsComplete);
 }