Exemplo n.º 1
0
        public async Task TestCreateAndCleanSimple()
        {


            var l = new Link<int, int>(x => Task.FromResult(x * 10));

            Assert.IsFalse(l.IsInstanceLoaded);


            var value = await l.GetItemAsync();
            Assert.IsTrue(l.IsInstanceLoaded);
            Assert.AreEqual(value, 0); //Id =0  result=0;

            l.LinkId = 100;
            Assert.IsFalse(l.IsInstanceLoaded);

            Assert.AreEqual(l.GetItem(), 1000);

        }