test "Sell 0 ships"
	status active
	description "Test departing without sell a ship."
	sequence
		# Create/inject the savegame and load it.
		inject "Fighters and Carriers and Escorts Save"
		call "Load First Savegame"
		call "Depart"
		# We can only check the conditions after departing, since the conditions are not updated directly after loading or selling.
		assert
			and
				"ships: Fighter" == 2
				"ships: Heavy Warship" == 1
				"ships: Medium Warship" == 1


test "Sell 1 ship"
	status active
	description "Test selling a single ship."
	sequence
		# Create/inject the savegame and load it.
		inject "Fighters and Carriers and Escorts Save"
		call "Load First Savegame"
		call "Sell first ship"
		call "Depart"
		# We can only check the conditions after departing, since the conditions are not updated directly after loading or selling.
		assert
			and
				"ships: Fighter" == 1
				"ships: Heavy Warship" == 1
				"ships: Medium Warship" == 1
				"flagship model: Finch" == 1
				"flagship model: Bactrian" == 0


test "Sell 2 ships"
	status active
	description "Test selling two ships."
	sequence
		# Create/inject the savegame and load it.
		inject "Fighters and Carriers and Escorts Save"
		call "Load First Savegame"
		call "Sell first ship"
		call "Sell first ship"
		call "Depart"
		# We can only check the conditions after departing, since the conditions are not updated directly after loading or selling.
		assert
			and
				"ships: Fighter" == 0
				"ships: Heavy Warship" == 1
				"ships: Medium Warship" == 1
				"flagship model: Bactrian" == 1
				"flagship model: Finch" == 0


test "Sell 3 ships"
	status active
	description "Test selling three ships."
	sequence
		# Create/inject the savegame and load it.
		inject "Fighters and Carriers and Escorts Save"
		call "Load First Savegame"
		call "Sell first ship"
		call "Sell first ship"
		call "Sell first ship"
		call "Depart"
		# We can only check the conditions after departing, since the conditions are not updated directly after loading or selling.
		assert
			and
				"ships: Fighter" == 0
				"ships: Heavy Warship" == 0
				"ships: Medium Warship" == 1
				"flagship model: Aerie" == 1
				"flagship model: Finch" == 0
				"flagship model: Bactrian" == 0
