Skip to content

Commit 7208624

Browse files
committed
Added Unit Tests
1 parent 5852a06 commit 7208624

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/SQLite.Tests/SourceGeneratorTest.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public class OuterTestSetter
3737

3838
[Column("A")]
3939
public string Z { get; set; }
40+
41+
private string Private { get; set; }
42+
public static string StaticProperty {get; set; }
4043
}
4144

4245
public class OuterTestDb : SQLiteConnection
@@ -224,6 +227,28 @@ public void SqliteInitializer_OuterTestSetter_DeriveIgnore_NotRegistered ()
224227
}
225228
}
226229

230+
[Test]
231+
public void SqliteInitializer_OuterTestSetter_Private_NotRegistered ()
232+
{
233+
if (!SQLite.FastColumnSetter.customSetter.TryGetValue ((typeof (OuterTestSetter), "Private"), out var setter)) {
234+
Assert.IsTrue (true, "Private properties Should not be registered");
235+
}
236+
else {
237+
Assert.Fail ("Private properties Should not be registered");
238+
}
239+
}
240+
241+
[Test]
242+
public void SqliteInitializer_OuterTestSetter_StaticProperty_NotRegistered ()
243+
{
244+
if (!SQLite.FastColumnSetter.customSetter.TryGetValue ((typeof (OuterTestSetter), nameof(OuterTestSetter.StaticProperty)), out var setter)) {
245+
Assert.IsTrue (true, "Static properties Should not be registered");
246+
}
247+
else {
248+
Assert.Fail ("Static properties Should not be registered");
249+
}
250+
}
251+
227252
[Test]
228253
public void SqliteInitializer_OuterTestSetter ()
229254
{

0 commit comments

Comments
 (0)