A method of spin assignment of neutron resonances based on capture gamma-ray detection