Ejemplo n.º 1
0
		public void BeFilledByItsSectors()
		{
			var board = new Dartboard();
			var ss = board.Sectors;
			for (int i = 0; i < 20; i++)
			{
				var sector = ss[i];
				Console.WriteLine(sector);
				var nextSector = ss[(i+1)%ss.Count];
				Assert.AreEqual(sector.StartAngle, nextSector.EndAngle, sector + ", " + nextSector);
			}
		}
Ejemplo n.º 2
0
		public void CalculateThrowResult(string expected, int x, int y)
		{
			var board = new Dartboard();
			var res = board.GetResult(x, y);
			Assert.AreEqual(expected, res.ToString());
		}
Ejemplo n.º 3
0
		public void CalculateSectorValueByCoordinates(int expectedSectorValue, int x, int y)
		{
			var board = new Dartboard();
			Section section = board.GetSector(x, y);
			Assert.AreEqual(expectedSectorValue, section.Value);
		}