public void Properties_NotEmpty_AfterCreateOne(UniverseSources source) { var asyncProperties = new AsyncProperties(Universe(source).Properties()); asyncProperties.Create("Test Property"); Assert.IsTrue(asyncProperties.Any()); }
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()); }
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()); }