I'm afraid that two countries who are allied will not fight against a common enemy. Only one of the two countries will fight, and that is decided randomly.
So if
This is the same for both Mathematical and Simulated battles.
The only time that two countries will fight together is during a sea battle, when their fleets will combine to fight a common enemy.