Beispiel #1
0
 def test_ver1(self):
     app = FizzBuzz()
     self.failIf(app.calc(87) != "Fizz")
     self.failIf(app.calc(20) != "Buzz")
     self.failIf(app.calc(45) != "FizzBuzz")
     self.failIf(app.calc(1500) != "FizzBuzz")
     self.failIf(app.calc(37284) != "Fizz")
Beispiel #2
0
    def test_V2_primes(self):
        app = FizzBuzz()

        self.failIf(app.calc(7) != "7 is a prime")
        self.failIf(app.calc(11) != "11 is a prime")
        self.failIf(app.calc(19) != "19 is a prime")
        self.failIf(app.calc(23) != "23 is a prime")
        self.failIf(app.calc(31) != "31 is a prime")
Beispiel #3
0
    def test_V2_primes(self):
        app = FizzBuzz()

        self.failIf(app.calc(7) !=  "7 is a prime")
        self.failIf(app.calc(11) !=  "11 is a prime")
        self.failIf(app.calc(19) !=  "19 is a prime")
        self.failIf(app.calc(23) !=  "23 is a prime")
        self.failIf(app.calc(31) !=  "31 is a prime")
Beispiel #4
0
    def test_V1_div5(self):
        app = FizzBuzz()

        self.failIf(app.calc(10) != "Buzz")
Beispiel #5
0
    def test_V1_div35(self):
        app = FizzBuzz()

        self.failIf(app.calc(15) != "FizzBuzz")
        self.failIf(app.calc(45) != "FizzBuzz")
Beispiel #6
0
    def test_V1_number(self):
        app = FizzBuzz()

        self.failIf(app.calc(1) != 1)
Beispiel #7
0
    def test_prime(self):
	app = FizzBuzz()

	self.failIf(app.calc(3) != "3 is a prime")
	self.failIf(app.calc(11) != "11 is a prime")
	self.failIf(app.calc(97) != "97 is a prime")
Beispiel #8
0
 def test_five(self):
     app = FizzBuzz()
     self.failIf(app.calc(15) != "FizzBuzz")
     self.failIf(app.calc(30) != "FizzBuzz")
Beispiel #9
0
    def test_one(self):
        app = FizzBuzz()

        self.failIf(app.calc(1) != 1)
Beispiel #10
0
    def test_buzz(self):
	app = FizzBuzz()

	self.failIf(app.calc(10) != "Buzz")
	self.failIf(app.calc(100) != "Buzz")
Beispiel #11
0
 def test_two(self):
     app = FizzBuzz()
     self.failIf(app.calc(6) != "Fizz")
Beispiel #12
0
 def test_four(self):
     app = FizzBuzz()
     self.failIf(app.calc(30) != "FizzBuzz")
Beispiel #13
0
    def test_V1_div3(self):	
	app = FizzBuzz()
		
	self.failIf(app.calc(9) != "Fizz")
Beispiel #14
0
 def test_5_7(self):
     app = FizzBuzz()
     self.failIf(app.calc(10) != "Buzz")
     self.failIf(app.calc(20) != "Buzz")
Beispiel #15
0
 def test_buzz(self):
     app=FizzBuzz()
     self.failIf(app.calc(0) = "Buzz")
Beispiel #16
0
 def test_fizz(self):
     app=FizzBuzz()
     self.failIf(app.calc(9) = "Fizz")
Beispiel #17
0
 def test_prime(self):
     app = FizzBuzz()
     self.failIf(app.calc(3) != "3 is a prime")
     self.failIf(app.calc(83) != "83 is a prime")
Beispiel #18
0
 def test_three(self):
     app = FizzBuzz()
     self.failIf(app.calc(10) != "Buzz")
Beispiel #19
0
    def test_V1_div35(self):
        app = FizzBuzz()

        self.failIf(app.calc(15) != "FizzBuzz")
        self.failIf(app.calc(45) != "FizzBuzz")
Beispiel #20
0
 def test_primes(self):
     app = FizzBuzz()
     for i in (2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97):
         self.failIf(app.calc(i) != "is a prime")
Beispiel #21
0
    def test_V1_number(self):
        app = FizzBuzz()

        self.failIf(app.calc(1) != 1)
Beispiel #22
0
    def test_fizz(self):
	app = FizzBuzz()

	self.failIf(app.calc(6) != "Fizz")
	self.failIf(app.calc(18) != "Fizz")
	self.failIf(app.calc(99) != "Fizz")
Beispiel #23
0
    def test_V1_div3(self):
        app = FizzBuzz()

        self.failIf(app.calc(9) != "Fizz")
Beispiel #24
0
    def test_fizzbuzz(self):
	app = FizzBuzz()
	
	self.failIf(app.calc(30) != "FizzBuzz")
	self.failIf(app.calc(90) != "FizzBuzz")
Beispiel #25
0
    def test_V1_div5(self):
        app = FizzBuzz()

        self.failIf(app.calc(10) != "Buzz")
Beispiel #26
0
    def test_one(self):
        app = FizzBuzz()

        self.failIf(app.calc(1) != 1)
Beispiel #27
0
 def test_three(self):
    app = FizzBuzz()
    self.failIf(app.calc(6) != "Fizz")
    self.failIf(app.calc(9) != "Fizz")