Пример #1
0
        public void CompositeId_GetHashCode_IsBasedOnAllComponents()
        {
            var id = new RemoteMembershipId
            {
                LoginProvider = "loginProvider",
                ProviderKey   = "providerKey",
            };

            id.GetHashCode().ShouldEqual(id.LoginProvider.GetHashCode() ^ id.ProviderKey.GetHashCode());
        }
Пример #2
0
        public void CompositeId_GetHashCode_ReturnsZero_WhenAnyComponentIsNull(string loginProvider, string providerKey)
        {
            var id = new RemoteMembershipId
            {
                LoginProvider = loginProvider,
                ProviderKey   = providerKey,
            };

            id.GetHashCode().ShouldEqual(0);
        }