Esempio n. 1
0
 public async Task ExecuteAsync(object parameter)
 {
     if (parameter is string value)
     {
         await _properties.CreateAsync(value);
     }
 }
        public async Task CreateAsync_InvokeEvent(UniverseSources source)
        {
            var value           = "TestPropertyValue";
            var asyncProperties = new AsyncProperties(Universe(source).Properties());
            var eventInvoked    = false;

            asyncProperties.NewPropertyEvent += (sender, args) => eventInvoked = true;

            var property = await asyncProperties.CreateAsync(value);

            Assert.AreEqual(property.Value(), property.Value());
            Assert.IsTrue(eventInvoked);
            Assert.IsTrue(asyncProperties.Any());
        }