Пример #1
0
        public bool ContainsKey(object key)
        {
            // Arrange
            IKeyedServiceRegister register = GetRegistrar();

            // Act
            // Assert
            return(register.Contains <IMyService>(key));
        }
Пример #2
0
        public void Contains_False()
        {
            // Arrange
            IKeyedServiceRegister register = GetRegistrar();

            // Act
            bool contains = register.Contains <IAsyncResult>();

            // Assert
            Assert.That(contains, Is.False);
        }
Пример #3
0
        public void Contains_True()
        {
            // Arrange
            IKeyedServiceRegister register = GetRegistrar();

            // Act
            bool contains = register.Contains <IMyService>();

            // Assert
            Assert.That(contains, Is.True);
        }
 public static bool Contains <TInterface>(this IKeyedServiceRegister register)
 {
     return(register.Contains(typeof(TInterface)));
 }