def main(): """ Entry point of the application which parses the given arguments. """ command_parser = CommandParser(EnhanceCommand(EnhanceService()), TemplateCommand(), RotationCommand()) command_parser.parse_args()
def test_execute_minus_rotation_divisible_by_90_should_set_rotation(self): """ Given a rotation smaller than 0 divisble by 90 When RotationCommand.execute() is called Then the configuration should not be filled with the rotation. """ # Arrange class_under_test = RotationCommand() rotation = -270 enhance_configuration = EnhancementConfiguration() expected_rotation = -270 # Act class_under_test.execute(rotation, False, enhance_configuration) # Assert self.assertEqual(expected_rotation, enhance_configuration.rotation)
def test_execute_rotation_bigger_than_360_should_not_set_rotation(self): """ Given a rotation bigger than 360 When RotationCommand.execute() is called Then the configuration should not be filled with the rotation. """ # Arrange class_under_test = RotationCommand() rotation = 360 + 90 enhance_configuration = EnhancementConfiguration() expected_rotation = 0 # Act class_under_test.execute(rotation, False, enhance_configuration) # Assert self.assertEqual(expected_rotation, enhance_configuration.rotation)
def test_execute_incorrectly_formatted_rotation_should_not_set_rotation( self): """ Given a incorrectly formatted rotation When RotationCommand.execute() is called Then the configuration should not be filled with the rotation. """ # Arrange class_under_test = RotationCommand() rotation = "kekse729" enhance_configuration = EnhancementConfiguration() expected_rotation = 0 # Act class_under_test.execute(rotation, False, enhance_configuration) # Assert self.assertEqual(expected_rotation, enhance_configuration.rotation)