public void DoComponetsContentTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor();
            string name = "buildinfo";
            string actual;
            //HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/components/buildinfo", "");

            //HttpResponse response = new HttpResponse(new StringWriter());
            //HttpContext context = new HttpContext(request, response);



            Thread.GetDomain().SetData(".appPath", AppDomain.CurrentDomain.BaseDirectory);
            Thread.GetDomain().SetData(".appVPath", "/");
            Thread.GetDomain().SetData(".appDomain", "*");
            TextWriter tw = new StringWriter();
            TestWorkerRequest wr = new TestWorkerRequest("/test/appinternals/components/buildinfo", "", tw);
            wr.SetRemoteAddress("127.0.0.1");

            HttpContext.Current = new HttpContext(wr);
            ISerializer serializer = new JSONSerializer();
            actual = target.DoComponetsContent(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            serializer = new HTMLSerializer();
            actual = target.DoComponetsContent(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            serializer = new XMLSerializer();
            actual = target.DoComponetsContent(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);

        }
        public void UpdateConfigBeanTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value

            ConfigBeanBase configBean = null; // TODO: Initialize to an appropriate value
            IReader expected = null; // TODO: Initialize to an appropriate value
            //HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");

            //HttpResponse response = new HttpResponse(new StringWriter());
            //HttpContext context = new HttpContext(request, response);
            //HttpContext.Current = context;


            Thread.GetDomain().SetData(".appPath", AppDomain.CurrentDomain.BaseDirectory);
            Thread.GetDomain().SetData(".appVPath", "/");
            Thread.GetDomain().SetData(".appDomain", "*");
            TextWriter tw = new StringWriter();
            TestWorkerRequest wr = new TestWorkerRequest("test/appinternals/configurations/beans/appsettingsbean", "action=view", tw);
            wr.SetRemoteAddress("127.0.0.1");
            HttpContext.Current = new HttpContext(wr);
            IReader actual;
            HttpRequest request = HttpContext.Current.Request;
            actual = target.UpdateConfigBean(configBean, request);
            Assert.AreNotEqual(expected, actual);

        }
 public void AppInernalsManagerConstructorTest()
 {
     AppInernalsManager_Accessor target = new AppInernalsManager_Accessor();
     Assert.IsNotNull(target);
 }
        public void DoLocalLogTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            string name = string.Empty;
            ISerializer serializer = new JSONSerializer(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            //HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/locallog/iislog/123", "");

            //HttpResponse response = new HttpResponse(new StringWriter());
            //HttpContext context = new HttpContext(request, response);
            //HttpContext.Current = context;

            Thread.GetDomain().SetData(".appPath", AppDomain.CurrentDomain.BaseDirectory);
            Thread.GetDomain().SetData(".appVPath", "/");
            Thread.GetDomain().SetData(".appDomain", "*");
            TextWriter tw = new StringWriter();
            TestWorkerRequest wr = new TestWorkerRequest("test/appinternals/locallog/iislog/123", "", tw);
            wr.SetRemoteAddress("127.0.0.1");

            HttpContext.Current = new HttpContext(wr);

            string actual;
            actual = target.DoLocalLog(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            name = "iislog";
            actual = target.DoLocalLog(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);

            name = "applog";
            actual = target.DoLocalLog(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
        }
        public void GetContextTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            string menu = string.Empty; // TODO: Initialize to an appropriate value
            ISerializer serializer = new HTMLSerializer(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");

            //HttpResponse response = new HttpResponse(new StringWriter());
            //HttpContext context = new HttpContext(request, response);
            //HttpContext.Current = context;


            Thread.GetDomain().SetData(".appPath", AppDomain.CurrentDomain.BaseDirectory);
            Thread.GetDomain().SetData(".appVPath", "/");
            Thread.GetDomain().SetData(".appDomain", "*");
            TextWriter tw = new StringWriter();
            TestWorkerRequest wr = new TestWorkerRequest("/test/appinternals/configurations/beans/appsettingsbean", "action=view", tw);
            wr.SetRemoteAddress("127.0.0.1");
            HttpContext.Current = new HttpContext(wr);
            string actual;
            actual = target.GetContext(menu, serializer);
            Assert.AreNotEqual(expected, actual);

        }
        public void DoDefaultTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            ISerializer serializer = new HTMLSerializer();
            //HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");

            //HttpResponse response = new HttpResponse(new StringWriter());
            //HttpContext context = new HttpContext(request, response);
            //HttpContext.Current = context;

            Thread.GetDomain().SetData(".appPath", AppDomain.CurrentDomain.BaseDirectory);
            Thread.GetDomain().SetData(".appVPath", "/");
            Thread.GetDomain().SetData(".appDomain", "*");
            TextWriter tw = new StringWriter();
            TestWorkerRequest wr = new TestWorkerRequest("/test/appinternals/configurations/beans/appsettingsbean", "action=view", tw);
            wr.SetRemoteAddress("127.0.0.1");


            HttpContext.Current = new HttpContext(wr);

            string actual;
            actual = target.DoDefault(serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            serializer = new JSONSerializer();
            actual = target.DoDefault(serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
        }
        public void DoFeatureContingencyEntityTest()
        {
            FeatureContingency.FCManager.Current.GetFCS();
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            //HttpRequest request = new HttpRequest("", "http://localhost/appinternals", "action=change");
            //HttpResponse response = new HttpResponse(new StringWriter());
            //HttpContext context = new HttpContext(request, response);
            //HttpContext.Current = context;

            Thread.GetDomain().SetData(".appPath", AppDomain.CurrentDomain.BaseDirectory);
            Thread.GetDomain().SetData(".appVPath", "/");
            Thread.GetDomain().SetData(".appDomain", "*");
            TextWriter tw = new StringWriter();
            TestWorkerRequest wr = new TestWorkerRequest("/appinternals", "action=change", tw);
            wr.SetRemoteAddress("127.0.0.1");

            HttpContext.Current = new HttpContext(wr);

            string name = "centrallogging";
            ISerializer serializer = new JSONSerializer(); // TODO: Initialize to an appropriate value
            string actual;
            actual = target.DoFeatureContingencyEntity(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);

            //request = new HttpRequest("", "http://localhost/appinternals", "action=view");

            //context = new HttpContext(request, response);
            //HttpContext.Current = context;

            tw = new StringWriter();
            wr = new TestWorkerRequest("/appinternals", "action=view", tw);
            wr.SetRemoteAddress("127.0.0.1");


            actual = target.DoFeatureContingencyEntity(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            //request = new HttpRequest("", "http://localhost/appinternals", "format=json");

            //context = new HttpContext(request, response);
            //HttpContext.Current = context;

            tw = new StringWriter();
            wr = new TestWorkerRequest("/appinternals", "format=json", tw);
            wr.SetRemoteAddress("127.0.0.1");

            actual = target.DoFeatureContingencyEntity(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
        }
        public void UpdateConfigBeanTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            ConfigBeanBase configBean = null; // TODO: Initialize to an appropriate value
            IReader expected = null; // TODO: Initialize to an appropriate value
            HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");

            HttpResponse response = new HttpResponse(new StringWriter());
            HttpContext context = new HttpContext(request, response);
            HttpContext.Current = context;
            IReader actual;
            actual = target.UpdateConfigBean(configBean, request);
            Assert.AreNotEqual(expected, actual);
           
        }
        public void DoComponetsContentTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor();
            string name = "buildinfo";
            string actual;
            HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/components/buildinfo", "");

            HttpResponse response = new HttpResponse(new StringWriter());
            HttpContext context = new HttpContext(request, response);
            HttpContext.Current = context;
            ISerializer serializer = new JSONSerializer();
            actual = target.DoComponetsContent(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            serializer = new HTMLSerializer();
            actual = target.DoComponetsContent(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            serializer = new XMLSerializer();
            actual = target.DoComponetsContent(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);

        }
        public void GetContextTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            string menu = string.Empty; // TODO: Initialize to an appropriate value
            ISerializer serializer = new HTMLSerializer(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");

            HttpResponse response = new HttpResponse(new StringWriter());
            HttpContext context = new HttpContext(request, response);
            HttpContext.Current = context;
            string actual;
            actual = target.GetContext(menu, serializer);
            Assert.AreNotEqual(expected, actual);
            
        }
 public void GetConfigurationReaderTest()
 {
     AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
     HttpRequest request = new HttpRequest("", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");
     string name = "beans"; // TODO: Initialize to an appropriate value
     string tname = "appsettingsbean"; // TODO: Initialize to an appropriate value
     IReader expected = null; // TODO: Initialize to an appropriate value
     IReader actual;
     HttpResponse response = new HttpResponse(new StringWriter());
     HttpContext context = new HttpContext(request, response);
     HttpContext.Current = context;
     actual = target.GetConfigurationReader(request, name, tname);
     Assert.AreNotEqual(expected, actual);
 }
        public void DoLocalLogTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            string name = string.Empty; 
            ISerializer serializer = new JSONSerializer(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/locallog/iislog/123", "");

            HttpResponse response = new HttpResponse(new StringWriter());
            HttpContext context = new HttpContext(request, response);
            HttpContext.Current = context;
            string actual;
            actual = target.DoLocalLog(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            name = "iislog";
            actual = target.DoLocalLog(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);

            name = "applog";
            actual = target.DoLocalLog(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
        }
        public void DoFeatureContingencyEntityTest()
        {
            FeatureContingency.FeatureContingencyManager.Current.GetFCS();
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            HttpRequest request = new HttpRequest("", "http://localhost/appinternals", "action=change");
            HttpResponse response = new HttpResponse(new StringWriter());
            HttpContext context = new HttpContext(request, response);
            HttpContext.Current = context;
            string name = "centrallogging";
            ISerializer serializer = new JSONSerializer(); // TODO: Initialize to an appropriate value
            string actual;
            actual = target.DoFeatureContingencyEntity(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);

            request = new HttpRequest("", "http://localhost/appinternals", "action=view");

            context = new HttpContext(request, response);
            HttpContext.Current = context;
            actual = target.DoFeatureContingencyEntity(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            request = new HttpRequest("", "http://localhost/appinternals", "format=json");

            context = new HttpContext(request, response);
            HttpContext.Current = context;
            actual = target.DoFeatureContingencyEntity(name, serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
        }
        public void DoDefaultTest()
        {
            AppInernalsManager_Accessor target = new AppInernalsManager_Accessor(); // TODO: Initialize to an appropriate value
            ISerializer serializer = new HTMLSerializer();
            HttpRequest request = new HttpRequest("~/", "http://localhost/test/appinternals/configurations/beans/appsettingsbean", "action=view");

            HttpResponse response = new HttpResponse(new StringWriter());
            HttpContext context = new HttpContext(request, response);
            HttpContext.Current = context;
            string actual;
            actual = target.DoDefault(serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
            serializer = new JSONSerializer();
            actual = target.DoDefault(serializer);
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Length > 0);
        }