|
| 1 | +# Test generated by RoostGPT for test awesome-python-ceaser-cipher using AI Type Open AI and AI Model gpt-4 |
| 2 | + |
| 3 | +import unittest |
| 4 | +from cipher import encrypt |
| 5 | + |
| 6 | +class TestEncrypt(unittest.TestCase): |
| 7 | + |
| 8 | + def test_Encrypt_71580cd1e0(self): |
| 9 | + # Test case 1: Testing with a simple message and a positive encryption number |
| 10 | + self.assertEqual(encrypt("Hello World", 3), "Khoor Zruog") |
| 11 | + |
| 12 | + # Test case 2: Testing with a simple message and a negative encryption number |
| 13 | + self.assertEqual(encrypt("Hello World", -3), "Ebiil Tloia") |
| 14 | + |
| 15 | + # Test case 3: Testing with a message containing special characters and a positive encryption number |
| 16 | + self.assertEqual(encrypt("Hello, World!", 3), "Khoor, Zruog!") |
| 17 | + |
| 18 | + # Test case 4: Testing with a message containing numbers and a positive encryption number |
| 19 | + self.assertEqual(encrypt("Hello World 123", 3), "Khoor Zruog 456") |
| 20 | + |
| 21 | + # Test case 5: Testing with a message containing numbers and a negative encryption number |
| 22 | + self.assertEqual(encrypt("Hello World 123", -3), "Ebiil Tloia 890") |
| 23 | + |
| 24 | + # Test case 6: Testing with a complex message containing letters, numbers, special characters and a positive encryption number |
| 25 | + self.assertEqual(encrypt("Hello, World! 123", 3), "Khoor, Zruog! 456") |
| 26 | + |
| 27 | + # Test case 7: Testing with a complex message containing letters, numbers, special characters and a negative encryption number |
| 28 | + self.assertEqual(encrypt("Hello, World! 123", -3), "Ebiil, Tloia! 890") |
| 29 | + |
| 30 | + # Test case 8: Testing with a message containing only spaces and a positive encryption number |
| 31 | + self.assertEqual(encrypt(" ", 3), " ") |
| 32 | + |
| 33 | + # Test case 9: Testing with a message containing only spaces and a negative encryption number |
| 34 | + self.assertEqual(encrypt(" ", -3), " ") |
| 35 | + |
| 36 | + # Test case 10: Testing with an empty message |
| 37 | + self.assertEqual(encrypt("", 3), "") |
| 38 | + |
| 39 | +if __name__ == '__main__': |
| 40 | + unittest.main() |
0 commit comments