If your only time with the wrong guy was one day before getting a positive on a pregnancy test, there is no doubt that you were already pregnant on the day you had the slip-up. Not only would a pregnancy test be unable to pick up a pregnancy that immediately after sex, but an embryo created the day before would not even be putting hCG into your system yet (which is what a pregnancy test measures) because it would not have implanted in your uterus so soon.