Esempio n. 1
0
 public TM_Rest_Direct()
 {
     //TMConfig.Current.TMSetup.UseAppDataFolder = true;									// set the TM XMl Database folder to be
     moq_HttpContext            = new API_Moq_HttpContext();
     HttpContextFactory.Context = moq_HttpContext.httpContext();
     TmRest = new TM_REST();
 }
 public void Setup()
 {
     moqHttpContext = new API_Moq_HttpContext();
     context        = HttpContextFactory.Context = moqHttpContext.httpContext();                 //clean http request for each test
     context.Session["SessionID"] = userSessionId;
     handleUrlRequest             = new HandleUrlRequest();
 }
Esempio n. 3
0
        public Test_JavascriptCombiner()
        {
            BaseDir        = "javascriptCombiner".tempDir(false);
            httpContextApi = new API_Moq_HttpContext(BaseDir);

            context  = httpContextApi.httpContext();
            request  = context.Request;
            response = context.Response;

            HttpContextFactory.Context = context;
        }
        public Test_Authentication()
        {
            var httpContextApi = new API_Moq_HttpContext();

            HttpContextFactory.Context = httpContextApi.HttpContextBase;

            adminUser = TMConfig.Current.DefaultAdminUserName;
            adminPwd  = TMConfig.Current.DefaultAdminPassword;

            //HttpContextFactory.Current.SetCurrentUserRoles(UserGroup.Admin);
            //UserGroup.Admin.setThreadPrincipalWithRoles(); // set current user as Admin
        }
        public void setup()
        {
            BaseDir = "javascriptCombiner".tempDir(false).createDir();
            Assert.IsTrue(BaseDir.dirExists());

            httpContextApi = new API_Moq_HttpContext(BaseDir);

            context  = httpContextApi.httpContext();
            request  = context.Request;
            response = context.Response;

            HttpContextFactory.Context = context;
        }
Esempio n. 6
0
        public void SetUp()
        {
            var assembly        = this.type().Assembly;
            var dllLocation     = assembly.CodeBase.subString(8);
            var webApplications = dllLocation.parentFolder().pathCombine(@"\..\..\..");

            TMRestUser = new TM_REST();
            var tmWebsite = webApplications.pathCombine("TM_Website");

            moq_HttpContext = new API_Moq_HttpContext(tmWebsite);
            var tmConfig    = TMConfig.Current;
            var credentials = new TM_Credentials {
                UserName = tmConfig.TMSecurity.Default_AdminUserName, Password = tmConfig.TMSecurity.Default_AdminPassword
            };
            //login with default value
            var sessionId = TmRest.Login_using_Credentials(credentials);
        }
Esempio n. 7
0
 public void Setup()
 {
     moqHttpContext = new API_Moq_HttpContext();
     context        = HttpContextFactory.Context = moqHttpContext.httpContext();
 }
Esempio n. 8
0
 public void Setup()
 {
     moqHttpContext   = new API_Moq_HttpContext();
     context          = HttpContextFactory.Context = moqHttpContext.httpContext();		//clean http request for each test
     handleUrlRequest = new HandleUrlRequest();
 }