public async Task DefaultRepo_ShouldReturnTheSameIdButNewProperties() { RepositoryDatabase database = new RepositoryDatabase(Settings); ProjectInfo prj = new ProjectInfo() { ProjectName = "Project1", ProjectUri = "SomeLocation", RepositoryId = this.testRepoOne.Id, TargetExtension = "exe" }; prj.Id.Should().Be(ObjectId.Empty); ProjectInfo returnedPrj = await database.Upsert(prj).ConfigureAwait(false); returnedPrj.Id.Should().NotBe(ObjectId.Empty); ProjectInfo prj2 = new ProjectInfo() { ProjectName = "Project1", ProjectUri = "SomeLocation", RepositoryId = this.testRepoOne.Id, TargetExtension = "dll" }; ProjectInfo returnedPrj2 = await database.Upsert(prj2).ConfigureAwait(false); returnedPrj2.Id.Should().BeEquivalentTo(returnedPrj.Id, "because it's the same project"); ProjectInfo attempt3 = await database.GetById(returnedPrj2.Id.ToString()).ConfigureAwait(false); attempt3.TargetExtension.Should().Be("dll", "because the project was updated"); }