public WebEasyTestFixtureHelperBase(string relativePathToWebApplication)
        {
            var testApplicationDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), relativePathToWebApplication);

            application = new TestApplication
            {
                IgnoreCase = true,
            };

            var doc = new XmlDocument();

            var additionalAttributes = new List <XmlAttribute>
            {
                CreateAttribute(doc, "PhysicalPath", testApplicationDir),
                CreateAttribute(doc, "URL", $"{testWebApplicationRootUrl}{GetUrlOptions()}"),
                CreateAttribute(doc, "SingleWebDev", true),
                CreateAttribute(doc, "DontRestartIIS", true),
                CreateAttribute(doc, "UseIISExpress", true),
            };

            application.AdditionalAttributes = additionalAttributes.ToArray();

            webAdapter = new WebAdapter();
            webAdapter.RunApplication(application, InMemoryDataStoreProvider.ConnectionString);
            adapter        = webAdapter.CreateCommandAdapter();
            commandAdapter = new TestCommandAdapter(adapter, application);
        }
Ejemplo n.º 2
0
        public void Web_EasyTest()
        {
            var webAdapter      = new WebAdapter();
            var testApplication = webAdapter.RunWebApplication($@"{AppDomain.CurrentDomain.ApplicationPath()}\..\TestWebApplication\", "65377");

            var commandAdapter = webAdapter.CreateCommandAdapter();

            var autoTestCommand = new AutoTestCommand();

            autoTestCommand.Execute(commandAdapter);
            webAdapter.KillApplication(testApplication, KillApplicationContext.TestNormalEnded);
        }
Ejemplo n.º 3
0
 public void Web_EasyTest()
 {
     using (var webAdapter = new WebAdapter()){
         var testApplication = webAdapter.RunWebApplication($@"{AppDomain.CurrentDomain.ApplicationPath()}\..\TestWebApplication\", 65377);
         try{
             var commandAdapter = webAdapter.CreateCommandAdapter();
             commandAdapter.TestLookupCascade();
         }
         finally{
             webAdapter.KillApplication(testApplication, KillApplicationContext.TestNormalEnded);
         }
     }
 }
Ejemplo n.º 4
0
 public async Task Web_EasyTest()
 {
     using (var webAdapter = new WebAdapter()){
         var testApplication = webAdapter.RunWebApplication($@"{AppDomain.CurrentDomain.ApplicationPath()}\..\TestWebApplication\", 65477);
         try{
             var commandAdapter = webAdapter.CreateCommandAdapter();
             commandAdapter.Execute(new LoginCommand());
             commandAdapter.TestLookupCascade();
             await commandAdapter.TestMicrosoftService(() => Observable.Start(() => commandAdapter.TestMicrosoftTodoService()));
         }
         finally{
             webAdapter.KillApplication(testApplication, KillApplicationContext.TestNormalEnded);
         }
     }
 }
 public override void SetUp()
 {
     adapter        = webAdapter.CreateCommandAdapter();
     commandAdapter = new TestCommandAdapter(adapter, application);
 }