PostgresInsertTests.cs 706 B

12345678910111213141516171819202122232425262728
  1. using PetaPoco.Tests.Integration.Models.Postgres;
  2. using Shouldly;
  3. using Xunit;
  4. namespace PetaPoco.Tests.Integration.Databases.Postgres
  5. {
  6. [Collection("Postgres")]
  7. public class PostgresInsertTests : BaseInsertTests
  8. {
  9. public PostgresInsertTests()
  10. : base(new PostgresDBTestProvider())
  11. {
  12. }
  13. [Fact]
  14. public void Insert_GivenPocoWithJsonTypes_ShouldBeValid()
  15. {
  16. var poco = new JsonTypesPoco();
  17. var id = DB.Insert(poco);
  18. var pocoOther = DB.Single<JsonTypesPoco>(poco.Id);
  19. poco.Id.ShouldBe(id);
  20. pocoOther.ShouldNotBeNull();
  21. pocoOther.ShouldBe(poco);
  22. }
  23. }
  24. }