public void OnUserInfoUpdate_GivenInfo_ShouldNotInvokeListenerWithDifferentType() { var module = new AuthenticationModule(); var userGuid = new Guid("10000000-0000-0000-0000-000000000001"); var userInfo = 5; UserInfoUpdate<uint> result = null; Action<UserInfoUpdate<uint>> callback = i => result = i; PortalApplication.Setup(m => m.GetSettings<AuthenticationSettings>("Authentication")).Returns(Make_AuthenticationSettings()); module.Load(PortalApplication.Object); module.AddUserInfoUpdateListener(callback); module.OnUserInfoUpdate(userGuid, userInfo); Assert.That(result, Is.Null); }