Ejemplo n.º 1
0
    def testShouldFailSinceMethodIsIllegal(self):
        cube = Cube()
        numberOfRotations = '1'
        cube.scramble(numberOfRotations, 'test')

        self.assertEquals('unknown function for scramble', cube.error)
Ejemplo n.º 2
0
    def testShouldFailSinceNIsIllegal3(self):
        cube = Cube()
        numberOfRotations = 'a'
        cube.scramble(numberOfRotations)

        self.assertEquals('n must be an integer between 0 to 99', cube.error)
Ejemplo n.º 3
0
    def testShouldTestScrambleNotBeing100Two(self):
        cube = Cube()
        numberOfRotations = '8'
        cube.scramble(numberOfRotations)

        self.assertNotEquals(cube.status, 'scrambled 100')
Ejemplo n.º 4
0
    def testShouldTestTransitionFidelity(self):
        cube = Cube()
        numberOfRotations = '1'
        cube.scramble(numberOfRotations, 'transition')

        self.assertEquals(cube.status, 'scrambled 67')
Ejemplo n.º 5
0
    def testShouldTestPicking1Rotations(self):
        cube = Cube()
        numberOfRotations = '1'
        cube.scramble(numberOfRotations)

        self.assertEquals(len(cube.rotations), int(numberOfRotations))