public bool ContainsKey(object key) { // Arrange IKeyedServiceRegister register = GetRegistrar(); // Act // Assert return(register.Contains <IMyService>(key)); }
public void Contains_False() { // Arrange IKeyedServiceRegister register = GetRegistrar(); // Act bool contains = register.Contains <IAsyncResult>(); // Assert Assert.That(contains, Is.False); }
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))); }