Exemple #1
0
        public void NullGuidTest()
        {
            var prm1 = new NpgsqlParameter("1", NpgsqlDbType.Uuid)
            {
                Value = System.DBNull.Value
            };

            prm1.GetNullableGuid().Should().BeNull("that was a null database guid value");
            prm1.GetGuid().Should().Be(Guid.Empty, "that was a null database guid value");
            var prm2 = new NpgsqlParameter("2", NpgsqlDbType.Uuid)
            {
                Value = Guid.Empty
            };

            prm2.GetGuid().Should().Be(Guid.Empty, "that was an empty database guid value");
            prm2.GetNullableGuid().Should().Be(Guid.Empty, "that was an empty database guid value");
        }