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]"); }
public void IncorrectlySerializedUserIsNotRetrieved() { var serializedGetter = new UserGetterSerialized(); var id = "username"; var user = serializedGetter.Get(id); Assert.Equal(null, user); }
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); }