public void NoOfTimesSeen_WithValidParameters2_ReturnsCorrectResult() { //act var x = BouncingBall.bouncingBall(30.0, 0.66, 1.5); //assert Assert.That(x, Is.EqualTo(15)); }
public void NoOfTimesSeen_WithInvalidBounceRate_ReturnsNegativeOne(double h, double bounce, double window) { //act var x = BouncingBall.bouncingBall(h, bounce, window); //assert Assert.That(x, Is.EqualTo(-1)); }
public void NoOfTimesSeen_WithInvalidWindowGreaterThanHeight_ReturnsNegativeOne(double h, double bounce, double window) { //act var x = BouncingBall.bouncingBall(4, 0.5, 5); //assert Assert.That(x, Is.EqualTo(-1)); }
public void NoOfTimesSeen_WithInvalidHeight_ReturnsNegativeOne() { //act var x = BouncingBall.bouncingBall(-1, 0.5, -2); //assert Assert.That(x, Is.EqualTo(-1)); }
static void Main(string[] args) { BouncingBall dropTheBall = new BouncingBall(); // test different cases here by changing inputs int result = dropTheBall.bouncingBall(3, 0.66, 1.5); // uncomment to see the result in the console // Console.WriteLine(result); }
static void Main(string[] args) { Console.WriteLine(BouncingBall.bouncingBall(3.0, 0.66, 1.5)); Console.ReadKey(); }
static void Main(string[] args) { //Console.WriteLine(Math.Log(1.5 / 3.0, 0.66)); Console.WriteLine(BouncingBall.bouncingBall(30.0, 0.66, 1.5)); Console.ReadKey(); }
public void Test2() { Assert.AreEqual(15, BouncingBall.bouncingBall(30.0, 0.66, 1.5)); }
public void Test1() { Assert.AreEqual(3, BouncingBall.bouncingBall(3.0, 0.66, 1.5)); }
public void Test9() { Assert.AreEqual(-1, BouncingBall.bouncingBall(5, -1, 1.5)); }
public void Test0() { Assert.AreEqual(1, BouncingBall.bouncingBall(2.0, 0.5, 1)); }
public void Test8() { Assert.AreEqual(-1, BouncingBall.bouncingBall(-5, 0.66, 1.5)); }
public void Test7() { Assert.AreEqual(-1, BouncingBall.bouncingBall(40, 1, 10)); }
public void Test6() { Assert.AreEqual(-1, BouncingBall.bouncingBall(10, 0.6, 10)); }
public void Test5() { Assert.AreEqual(3, BouncingBall.bouncingBall(40, 0.4, 10)); }
public void Test3() { Assert.AreEqual(21, BouncingBall.bouncingBall(30, 0.75, 1.5)); }