diff --git a/src/agents/test_agent_factory.py b/src/agents/test_agent_factory.py new file mode 100644 index 0000000..9b1e901 --- /dev/null +++ b/src/agents/test_agent_factory.py @@ -0,0 +1,13 @@ +from agents.agent_factory import create_agent +from agents.randomAgent import RandomAgent + +def test_create_agent_random(): + agent = create_agent('random') + assert isinstance(agent, RandomAgent) + +def test_create_agent_unknown(): + try: + create_agent('unknown') + assert False, "Expected ValueError" + except ValueError as e: + assert str(e) == "Unknown agent type: unknown" \ No newline at end of file