Beispiel #1
0
        public Session TestCreateSession()
        {
            IPrepareSession preSession = new PrepareSession();
            String username = "******";
            String password = "******";
            UserService service = new UserService();
            UserDto dto = service.ValidateUser(username, password);
            SessionObjects sessionObjects = SessionObjects.CreateInstance();
            Session session = sessionObjects.CreateSession(dto);

            Console.WriteLine(session.Age);

            Assert.IsNotNull(session);
            return session;
        }
Beispiel #2
0
        public void TestPrepare()
        {
            IPrepareSession preSession = new PrepareSession();
            String username = "******";
            String password = "******";

            UserService service = new UserService();

            UserDto dto = service.ValidateUser(username, password);

            Session session = preSession.Prepare(dto);

            Console.Write(dto.Name);

            Console.Write(session.Name);

            Assert.IsNotNull(session, "Should not be null");
        }
Beispiel #3
0
 public Session CreateSession(UserDto user)
 {
     IPrepareSession prepareSession = new PrepareSession();
         Session session = prepareSession.Prepare(user);
         return session;
 }