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)); }
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)); }
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(); }