At the time of the unconditional surrender of Germany on May 8, 1945, the Manhattan Project was still months away from producing a working weapon.
Because of the difficulties in making a working plutonium bomb, it was decided that there should be a test of the weapon.
On July 16, 1945, in the desert north of Alamogordo, New Mexico, the first nuclear test took place, code-named "Trinity", using a device nicknamed "the gadget." The test, a plutonium implosion type device, released energy equivalent to 19 kilotons of TNT, far more powerful than any weapon ever used before. The news of the test's success was rushed to Truman at the Potsdam Conference, where Churchill was briefed and Joseph Stalin was informed of the new weapon. On July 26, the Potsdam Declaration was issued containing an ultimatum for Japan: either surrender or suffer "complete and utter destruction", although nuclear weapons were not mentioned.
http://en.wikipedia.org/wiki/History_of ... _Hiroshima