using NUnit.Framework;
using ServiceStack;
namespace Repro
{
[TestFixture]
public class Tests
{
[Test]
public void TestPopulateWithNonDefaultValues()
{
var to = new To
{
Enabled = true,
};
var from = new From();
to.PopulateWithNonDefaultValues(from);
// 6.4 success, 6.9 fails
Assert.True(to.Enabled);
}
}
public class To
{
public bool Enabled { get; set; }
}
public class From
{
public bool? Enabled { get; set; }
}
}