public void ManagerLoadsUsers()
        {
            ExternalFileSecurityManager manager = new ExternalFileSecurityManager();

            manager.Files = new string[]
            {
                GenerateUsersFile()
            };
            manager.Initialise();
            IAuthentication actualUser = manager.RetrieveUser("johndoe");

            Assert.IsNotNull(actualUser, "User not found");
        }
        private string InitialiseManagerAndLogin(ExternalFileSecurityManager manager, string userName)
        {
            manager.Files = new string[]
            {
                GenerateUsersFile()
            };
            manager.Initialise();
            LoginRequest credentials = new LoginRequest(userName);

            credentials.AddCredential(LoginRequest.PasswordCredential, "whoareyou");
            string session = manager.Login(credentials);

            Assert.IsFalse(string.IsNullOrEmpty(session), "Session has not been allocated");
            return(session);
        }