Exemple #1
0
        public void CompareToMethodOneIdentityNull()
        {
            UserAssignedIdentity identity1 = new UserAssignedIdentity(Guid.Empty, Guid.Empty);
            UserAssignedIdentity identity2 = null;

            Assert.AreEqual(1, identity1.CompareTo(identity2));
        }
Exemple #2
0
        public void CompareTo(int answer, string clientId1, string principalId1, string clientId2, string principalId2)
        {
            UserAssignedIdentity identity1 = new UserAssignedIdentity(new Guid(clientId1), new Guid(principalId1));
            UserAssignedIdentity identity2 = new UserAssignedIdentity(new Guid(clientId2), new Guid(principalId2));

            Assert.AreEqual(answer, identity1.CompareTo(identity2));
            Assert.AreEqual(answer * -1, identity2.CompareTo(identity1));
        }