Skip to content

Commit 7b17f26

Browse files
committed
added partial test
1 parent 4990314 commit 7b17f26

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

tests/SQLite.Tests/SourceGeneratorTest.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ public class IntTest : BaseTest<int>
7373
{
7474
}
7575

76+
77+
public partial class PartialTest
78+
{
79+
[PrimaryKey]
80+
public string Id { get; set; }
81+
}
82+
83+
public partial class PartialTest
84+
{
85+
[Column ("Test")]
86+
public string Test { get; set; }
87+
}
88+
7689
public class BaseTest<T>
7790
{
7891
[PrimaryKey]
@@ -208,6 +221,28 @@ public void SqliteInitializer_StringTestSetter ()
208221
}
209222
}
210223

224+
[Test]
225+
public void SqliteInitializer_PartialTestSetter ()
226+
{
227+
if (SQLite.FastColumnSetter.customSetter.TryGetValue ((typeof (PartialTest), nameof (PartialTest.Id)), out var setter)) {
228+
Assert.IsTrue (true, "Should be registered");
229+
}
230+
else {
231+
Assert.Fail ("Should be registered");
232+
}
233+
}
234+
235+
[Test]
236+
public void SqliteInitializer_PartialTestSetter_Test()
237+
{
238+
if (SQLite.FastColumnSetter.customSetter.TryGetValue ((typeof (PartialTest), nameof (PartialTest.Test)), out var setter)) {
239+
Assert.IsTrue (true, "Should be registered");
240+
}
241+
else {
242+
Assert.Fail ("Should be registered");
243+
}
244+
}
245+
211246
[Test]
212247
public void SqliteInitializer_IntTestSetter ()
213248
{

0 commit comments

Comments
 (0)