changed add_test_cases to be a CodeSamples class method