summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/Model.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/efl_mono/Model.cs')
-rw-r--r--src/tests/efl_mono/Model.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index 13e0d15..bb6ba3b 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -9,9 +9,9 @@ using System.Diagnostics.CodeAnalysis;
9namespace TestSuite { 9namespace TestSuite {
10 10
11[SuppressMessage("Gendarme.Rules.Portability", "DoNotHardcodePathsRule")] 11[SuppressMessage("Gendarme.Rules.Portability", "DoNotHardcodePathsRule")]
12public class TestModel { 12public static class TestModel {
13 13
14 public class VeggieViewModel 14 private class VeggieViewModel
15 { 15 {
16 public string Name { get; set; } 16 public string Name { get; set; }
17 public string Type { get; set; } 17 public string Type { get; set; }
@@ -32,7 +32,8 @@ public class TestModel {
32 { 32 {
33 Efl.Loop loop = Efl.App.AppMain; 33 Efl.Loop loop = Efl.App.AppMain;
34 34
35 var veggies = CreateModel(loop); 35 var model = CreateModel(loop);
36 model.Dispose();
36 } 37 }
37 38
38 internal static async Task EasyModelExtractionAsync (Efl.Loop loop) 39 internal static async Task EasyModelExtractionAsync (Efl.Loop loop)
@@ -42,13 +43,15 @@ public class TestModel {
42 var model = new Efl.GenericModel<VeggieViewModel>(veggies, loop); 43 var model = new Efl.GenericModel<VeggieViewModel>(veggies, loop);
43 Test.AssertEquals(3, (int)model.GetChildrenCount()); 44 Test.AssertEquals(3, (int)model.GetChildrenCount());
44 45
45 VeggieViewModel r2 = await model.GetAtAsync(1); 46 VeggieViewModel r2 = await model.GetAtAsync(1).ConfigureAwait(false);
46 Test.AssertEquals(r2.Name, "Romaine Lettuce"); 47 Test.AssertEquals(r2.Name, "Romaine Lettuce");
47 48
48 VeggieViewModel r = await model.GetAtAsync(0); 49 VeggieViewModel r = await model.GetAtAsync(0).ConfigureAwait(false);
49 Test.AssertEquals(r.Name, "Tomato"); 50 Test.AssertEquals(r.Name, "Tomato");
50 51
51 loop.End(); 52 loop.End();
53 model.Dispose();
54 veggies.Dispose();
52 } 55 }
53 56
54 public static void easy_model_extraction () 57 public static void easy_model_extraction ()
@@ -77,6 +80,8 @@ public class TestModel {
77 80
78 Test.Assert(callbackCalled, "Property bound callback must have been called."); 81 Test.Assert(callbackCalled, "Property bound callback must have been called.");
79 Test.AssertEquals(propertyBound, "style"); 82 Test.AssertEquals(propertyBound, "style");
83 factory.Dispose();
84 parent.Dispose();
80 } 85 }
81} 86}
82 87