let heartManager = new HeartManager();

QUnit.test( "MaxCount", function( assert ) {
	heartManager.setCount(3);
	assert.equal(heartManager.getCount(), 3);

	heartManager.setMaxCount(5);
	assert.equal(heartManager.getCount(), 3);

	heartManager.setMaxCount(3);
	assert.equal(heartManager.getCount(), 3);

	heartManager.setMaxCount(2);
	assert.equal(heartManager.getCount(), 2);
});


QUnit.test( "setCount", function( assert ) {
	heartManager.setMaxCount(3);

	heartManager.setCount(3);
	assert.equal(heartManager.getCount(), 3);

	heartManager.setCount(2);
	assert.equal(heartManager.getCount(), 2);
});


QUnit.test( "addHearts", function( assert ) {
	heartManager.setMaxCount(3);

	heartManager.setCount(1);
	assert.equal(heartManager.getCount(), 1);

	heartManager.addHearts(1);
	assert.equal(heartManager.getCount(), 2);

	heartManager.setCount(1);
	assert.equal(heartManager.getCount(), 1);

	heartManager.addHearts(2);
	assert.equal(heartManager.getCount(), 3);

	heartManager.setCount(1);
	assert.equal(heartManager.getCount(), 1);

	heartManager.addHearts(3);
	assert.equal(heartManager.getCount(), 3);
});


QUnit.test( "breakHearts", function( assert ) {
	heartManager.setMaxCount(3);

	heartManager.setCount(3);
	assert.equal(heartManager.getCount(), 3);

	heartManager.breakHearts(1);
	assert.equal(heartManager.getCount(), 2);

	heartManager.breakHearts(2);
	assert.equal(heartManager.getCount(), 0);
});