module("BondDeducer");

test("Check Deduce Bonds on Empty Molecule", function(){
	var mol = new Molecule();
	expect(4);
    equals(0, mol.atoms.length, 'Check atoms before');
	equals(0, mol.bonds.length, 'Check bonds before');
	deduceCovalentBonds(mol);
    equals(0, mol.atoms.length, 'Check atoms after');
	equals(0, mol.bonds.length, 'Check bonds after');
});

test("Check Deduce Bonds on Large PDB File", function(){
	var mol = readPDB(oneBNA);
	expect(5);
    equals(566, mol.atoms.length, 'Check atoms before');
	mol.bonds = [];
	equals(0, mol.bonds.length, 'Check bonds before');
	deduceCovalentBonds(mol);
    equals(566, mol.atoms.length, 'Check atoms after');
	equals(544, mol.bonds.length, 'Check bonds after');
	mol.bonds = [];
	LEEWAY = 0;
	deduceCovalentBonds(mol);
	LEEWAY = 1.1;
	equals(0, mol.bonds.length, 'Check LEEWAY has Effect');
});

test("Check getPointsPerAngstrom", function(){
	expect(1);
    equals(default_bondLength_2D / default_angstromsPerBondLength, getPointsPerAngstrom(), 'Check calculation');
});
