Exemplo n.º 1
0
        public void OneWayBinding_WithInitialValue_ValueChanged()
        {
            var source = new Observable <int>();
            var target = new Stub <int>();

            source.Value = 5;

            var binding = target.Bind(source).Property(s => s.Value, t => t.Value, Transmute.Transmuter.Default.GetConverter <int, int>());

            Assert.AreEqual(source.Value, target.Value);
        }
Exemplo n.º 2
0
        public void OneWayBinding_WithInitialValue_ValueChanged()
        {
            var source = new Observable <int>();
            var target = new Stub <int>();

            source.Value = 5;

            var binding = target.Bind(source).Property(s => s.Value, t => t.Value, Converters.Identity <int>());

            Assert.AreEqual(source.Value, target.Value);
        }