コード例 #1
0
 public RegistrationConfirmationTest()
 {
     //
     // TODO: Add constructor logic here
     //
     this.fg = new ForumGenerator("admin", "admin");
 }
コード例 #2
0
        public static bool checkSuperUserAuthorization(ForumGenerator fg, string userName, string password)
        {
            if (fg.superUser.userName == userName && fg.superUser.password == password)
                return true;

            return false;
        }
コード例 #3
0
        public void adminLogged_After_Login()
        {
            // arrange
            ForumGenerator fg = new ForumGenerator("admin", "admin",true);

            // act
            fg.superUserLogin("admin", "admin");

            // assert
            //Assert.IsTrue(fg.getSuperUser().isLogged());
        }
コード例 #4
0
        public void login_as_superuser_with_wrong_pass()
        {
            // arrange
            ForumGenerator fg = new ForumGenerator("admin", "admin");

            // act
            bool ans = Security.checkSuperUserAuthorization(fg, "admin", "wrong");

            // assert
            Assert.IsFalse(ans);
        }
コード例 #5
0
 public MyHttpServer(int port, ForumGenerator forum_gen)
     : base(port)
 {
     _forum_gen = forum_gen;
 }
コード例 #6
0
 public HttpServer()
 {
     _forumGen = new ForumGenerator("admin", "admin");
 }
コード例 #7
0
 public RealForumGeneratorImpl(ForumGenerator forumGen)
 {
     Console.Write("Creating ForumGenerator...  ");
     this.forumGen = forumGen;
     Console.WriteLine("done");
 }
コード例 #8
0
 // constructor
 public TestForumGenerator(ForumGenerator forumGen, string outFile)
 {
     this.bridge = new RealForumGeneratorImpl(forumGen);
     this.testsLogger = new TestsLogger(outFile);
     this.mode = REAL;
 }