Beispiel #1
0
        public async Task A_Acquire_T_Async()
        {
            // Arrange
            var ee = new EventHandler();

            new A(ee);

            // Act
            await ee.InvokeAsync("Update");

            var result1 = await ee.AcquireAsync <bool>("GetUpdate");

            var result2 = await ee.AcquireAsync <int>("GetUpdate");

            // Assert
            CollectionAssert.AreEqual(result1.ToArray(), new bool[] { });
            CollectionAssert.AreEqual(result2.ToArray(), new int[] { 1 });
        }
Beispiel #2
0
        public async Task A_Acquire_Async()
        {
            // Arrange
            var ee = new EventHandler();

            new A(ee);

            // Act
            var result = await ee.AcquireAsync("Update");

            // Assert
            CollectionAssert.AreEqual(result.ToArray(), new object[] { null });
        }