Ejemplo n.º 1
0
        public void Properties_NotEmpty_AfterCreateOne(UniverseSources source)
        {
            var asyncProperties = new AsyncProperties(Universe(source).Properties());

            asyncProperties.Create("Test Property");
            Assert.IsTrue(asyncProperties.Any());
        }
Ejemplo n.º 2
0
        public void Properties_Empty_AfterDelete(UniverseSources source)
        {
            var asyncProperties = new AsyncProperties(Universe(source).Properties());

            asyncProperties.Create("Test Property");
            asyncProperties.First().Delete();
            Assert.IsFalse(asyncProperties.Any());
        }
Ejemplo n.º 3
0
        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());
        }