예제 #1
0
        public OgrenciYonetimModuluOgrenciListeleme(FeatureContext featureContext)
        {
            FeatureContext = featureContext;

            factory       = featureContext.Get <SmsWebApplicationFactory <Startup> >("SmsWebApplicationcontext");
            httpClient    = factory.CreateClient();
            optionManager = factory.OptionManager;
        }
        public OgrenciYonetimModuluOgrenciEkleme(ScenarioContext scenarioContext, FeatureContext featureContext)
        {
            scenarioContext = scenarioContext;
            FeatureContext  = featureContext;

            factory       = featureContext.Get <SmsWebApplicationFactory <Startup> >("SmsWebApplicationcontext");
            httpClient    = factory.CreateClient();
            optionManager = factory.OptionManager;
        }
예제 #3
0
        public OgrenciYonetimModuluOgrenciBackground(ScenarioContext scenarioContext, FeatureContext featureContext)
        {
            //burası background lduğu için aslında hangi senaryo çalışıyorsa oranın senaryo kaydına gideceği için burada kullanmak çok mantıklı değil aslında
            // bu nedenla aşağıda bu clas için private değişkenler tanımlanarak class içi veriler bu değişkenlerle taşındı
            scenarioContext = scenarioContext;
            FeatureContext  = featureContext;

            var count = featureContext.Keys.Where(t => t == "SmsWebApplicationcontext").Count();

            if (count == 0)
            {
                featureContext.Add("SmsWebApplicationcontext", new SmsWebApplicationFactory <Startup>());
            }


            factory    = featureContext.Get <SmsWebApplicationFactory <Startup> >("SmsWebApplicationcontext");
            httpClient = factory.CreateClient();
        }
예제 #4
0
 public StudentcontrollerTests(SmsWebApplicationFactory <Startup> factory) : base()
 {
     _client        = factory.CreateClient();
     _optionManager = factory.OptionManager;
 }