Пример #1
0
        public void AU_E2()
        {
            UserRuntime userRuntime = new UserRuntime();
            UserInfo    user;

            user.expiringTime = DateTime.Now.AddDays(1);
            user.userName     = "******";
            for (int i = 0; i < 10; ++i)
            {
                user.userID = Guid.NewGuid();
                userRuntime.AuthorizeUser(user);
            }
            user.userID = Guid.NewGuid();

            Assert.IsFalse(userRuntime.AuthorizeUser(user));
        }
Пример #2
0
        public void AU_E1()
        {
            UserRuntime userRuntime = new UserRuntime();
            UserInfo    user;

            user.expiringTime = DateTime.Now.AddDays(1);
            user.userID       = Guid.NewGuid();
            user.userName     = "******";

            Assert.IsTrue(userRuntime.AuthorizeUser(user));
        }
Пример #3
0
        public void Write()
        {
            UserRuntime userRuntime = new UserRuntime();
            UserInfo    user;

            user.expiringTime = DateTime.Now.AddDays(1);
            user.userID       = Guid.NewGuid();
            user.userName     = "******";
            userRuntime.AuthorizeUser(user);

            userRuntime.WriteToFile();
        }