Files
wehub-resource-sync b957a53def
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:21:23 +08:00

34 lines
1.0 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
using System;
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel.Connectors.PgVector;
using Xunit;
namespace SemanticKernel.Connectors.PgVector.UnitTests;
public class PostgresCollectionTests
{
private const string TestCollectionName = "testcollection";
[Fact]
public void ThrowsForUnsupportedType()
{
// Arrange
var recordDefinition = new VectorStoreCollectionDefinition
{
Properties = [
new VectorStoreKeyProperty("HotelId", typeof(ulong)),
new VectorStoreDataProperty("HotelName", typeof(string)) { IsIndexed = true, IsFullTextIndexed = true },
]
};
var options = new PostgresCollectionOptions()
{
Definition = recordDefinition
};
// Act & Assert
Assert.Throws<NotSupportedException>(() => new PostgresDynamicCollection("Host=localhost;Database=test;", TestCollectionName, options));
}
}