public async Task Given_A_Non_Existing_Profile__When_Deleting_Profile__Throws_Profile_Not_Found_Exception() { // Arrange var profile = Profile.Create(new CreateProfileRequest { Username = "******" }); // Act + Assert Assert.That(async() => await this.unitOfWork.Profiles.Read(profile.Username), Throws.InstanceOf <ProfileNotFoundException>()); }
private async Task <Profile> CreateTestProfile() { var profile = Profile.Create(new CreateProfileRequest { UserId = userId, Username = "******", Bio = "bio", DisplayName = "Test Profile", ImageUrl = "ImageUrl" }); await this.unitOfWork.Profiles.Create(profile); await this.unitOfWork.SaveAsync(); return(profile); }