In many books, movies, plays, TV shows about Caesar, his naming of Octavian as his heir and legal son is often shown as a surprise to everyone and even a snub to Marc Antony. However, considering how common adoption was in Rome, combined with the fact that Octavian was Caesar's closest living male relative it seems expected that he would be his heir.
Very unexpected, but not because he was adopted. Caesar had no natural heir of his own, in which cases adoption by will was ordinary. Caesar was expected to adopt somebody; whom he would adopt was at question. Most people expected Antony, and not without reason. Though Antony had not played as much part in Caesar's successes prior to the civil war his seniors, such as Labienus or Q. Cicero, had mostly either died or gone over to Pompey. Of the surviving Caesarians Antony was undoubtedly the chief. It was in his tribunate that the civil war had begun, and he had been beaten and expelled from the senate along with his colleague Cassius Longinus. Though Antony had failed spectacularly as governor of Italy in Caesar's absence in 47 (likely the reason for his minor part in Caesar's will) and his brother's command in Illyricum defected to Pompey, surrendering control of the Adriatic, he had fought well at Pharsalus, commanding the left with distinction. By early 44 Antony's relationship with Caesar appeared to be recovering after several years out of the dictator's good graces, assuming the consulship with Caesar as his colleague in 44. Of the remaining Caesarians few seemed especially remarkable in comparison. Lepidus had been Caesar's co-consul in 46, during Antony's cooling-off period, but despite being appointed magister equitum twice he never held quite as much presence among the Caesarians as Antony (who, I might add, was rapidly becoming a political figure in his own right. His marriage to Fulvia challenged Dolabella's claim to succession of P. Clodius' urban program). Octavian, on the other hand, was not even twenty at the time of Caesar's murder, too young to be elected to any public office and totally untried. Roman adoption for the heirless generally cared little about who a man's next closest relation was, and there were few who would have expected Octavian to succeed by Caesar's will--indeed, Brutus, Caesar's secondary heir, made more sense, although due to the unfortunate circumstances his presence at such a noteworthy position in the will was met with rather a lot of hostility. It's likely that Antony was originally Caesar's heir, as Calpurnia produced documents from Caesar's home that appeared to confirm Antony's succession, and Antony certainly acted, with the tacit approval of just about all the loyal Caesarians, as if he expected to succeed by Caesar's will, up until the moment it was read