Exemple #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);

            BootStrap.Init();
        }
Exemple #2
0
        public void Upload_ValidProdutFile_ProductsCreated(string partner, string startBy, string expected)
        {
            //string productContractInput = $@"{GetAssemblyDirectory()}\TestData\MusicContract.txt";
            //ProductCreateController prodCreatecontroller = new ProductCreateController();
            //prodCreatecontroller.Upload(productContractInput);

            //string partnerContractInput = $@"{GetAssemblyDirectory()}\TestData\PartnerContract.txt";
            //PartnerCreateController partnerCreatorController = new PartnerCreateController();
            //partnerCreatorController.Upload(partnerContractInput);

            BootStrap bs = new BootStrap();

            //Initialise database with default data from the local file
            bs.Init(null);

            //Execute the search
            var actual = bs.Execute(partner, startBy);

            Assert.IsTrue(actual.StartsWith(expected));
        }
Exemple #3
0
        public void TestMethod1()
        {
            BootStrap.Init();
            //    ConfigurationHelper.SetConsoleLogger();
            LogUtil.Error("asdf");
            DemoRepository demoRep = new DemoRepository(new DataAccessFactory());

            #region ÐÂÔö
            Demo newDemo = new Demo()
            {
                FAge = 1, FBirthday = DateTime.Now, FName = "test1"
            };
            demoRep.Insert(newDemo);
            #endregion

            #region ²éѯ
            var list     = demoRep.QueryList(x => x.FName == "test1");
            var jsonList = new NewtonsoftJsonSerializer().GetJsonByObj(list);
            Console.WriteLine(jsonList);
            #endregion
        }