-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
GH0511.cs
25 lines (21 loc) · 907 Bytes
/
GH0511.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace Catel.Fody.Tests.Repros
{
using System;
using Catel.Reflection;
using NUnit.Framework;
[TestFixture]
public class GH0511TestFixture
{
[TestCase]
public void Raises_PropertyChanged_With_Updated_Value()
{
var modelType = AssemblyWeaver.Instance.Assembly.GetType("Catel.Fody.TestAssembly.Bugs.GH0511.AppSettingsModel");
var model = Activator.CreateInstance(modelType);
var viewModelType = AssemblyWeaver.Instance.Assembly.GetType("Catel.Fody.TestAssembly.Bugs.GH0511.AppSettingsViewModel");
var viewModel = Activator.CreateInstance(viewModelType, model) as dynamic;
viewModel.ExpectedValue = "test";
PropertyHelper.SetPropertyValue(model, "SelectedThemeName", "test");
Assert.That(viewModel.AppSettings.SelectedThemeName, Is.EqualTo("test"));
}
}
}