public void GetOnAppDisposingProperty_IfPropertyIsAbsent_ReturnsCancellationTokenNone()
        {
            // Arrange
            IDictionary <string, object> properties = CreateStubOnAppDisposingDictionary(onAppDisposing: null, hasOnAppDisposing: false);
            IAppBuilder builder = CreateStubAppBuilder(properties);

            // Act
            CancellationToken onAppDisposing = WebApiAppBuilderExtensions.GetOnAppDisposingProperty(builder);

            // Assert
            Assert.Equal(CancellationToken.None, onAppDisposing);
        }
        public void GetOnAppDisposingProperty_IfPropertyIsNonCancellationToken_ReturnsCancellationTokenNone()
        {
            // Arrange
            object nonCancellationToken             = new object();
            IDictionary <string, object> properties = CreateStubOnAppDisposingDictionary(nonCancellationToken);
            IAppBuilder builder = CreateStubAppBuilder(properties);

            // Act
            CancellationToken onAppDisposing = WebApiAppBuilderExtensions.GetOnAppDisposingProperty(builder);

            // Assert
            Assert.Equal(CancellationToken.None, onAppDisposing);
        }