예제 #1
0
        public QManagerTests()
        {
            var listener = new Mock <IQEventsListener>();

            manager = new QManager(listener.Object);
            var userGetterSerialized = new UserGetterSerialized();

            user  = userGetterSerialized.Get("me;me myself and i;[email protected]");
            user2 = userGetterSerialized.Get("him;he him;[email protected]");
        }
예제 #2
0
        public void IncorrectlySerializedUserIsNotRetrieved()
        {
            var serializedGetter = new UserGetterSerialized();
            var id = "username";

            var user = serializedGetter.Get(id);

            Assert.Equal(null, user);
        }
예제 #3
0
        public void CorrectlySerializedUserRetrievedFully()
        {
            var serializedId     = "username;Full Name;[email protected]";
            var serializedUser   = new User("username", "Full Name", "*****@*****.**", "username");
            var serializedGetter = new UserGetterSerialized();

            var actual = serializedGetter.Get(serializedId);

            Assert.Equal(serializedUser.UserName, actual.UserName);
            Assert.Equal(serializedUser.FullName, actual.FullName);
            Assert.Equal(serializedUser.EmailAddress, actual.EmailAddress);
            Assert.Equal(serializedUser.DistinguishedName, actual.DistinguishedName);
        }