예제 #1
0
    public void List_UserNotLoggedIn()
    {
      var cmd = new Cmd.UserManager();
      InitCommand(cmd);

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
      Assert.That(result.Message, Is.Not.StringContaining(UserName));
    }
예제 #2
0
    public void Kick_UserNotLoggedIn()
    {
      var cmd = new Cmd.UserManager();
      InitCommand(cmd);

      cmd.KickID = "blahblahblah";

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
    }
예제 #3
0
    public void List_UserLoggedIn()
    {
      var cmd = new Cmd.UserManager();
      InitCommand(cmd);

      DomainAccessGuard.Login(_sessionId, UserName);

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success), result.Message);
      Assert.That(result.Message, Is.StringContaining(UserName), result.Message);
    }
예제 #4
0
    public void Kick_UserLoggedIn()
    {
      var cmd = new Cmd.UserManager();
      InitCommand(cmd);

      DomainAccessGuard.Login(_sessionId, UserName);

      cmd.KickID = _sessionId;

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      var postSession = (from s in DomainAccessGuard.Sessions
                     where s.UserName == UserName
                     select s).FirstOrDefault();

      Assert.That(postSession, Is.Null);
    }