This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (args.Length == 1 && args[0].ToLower() == "seeddata") | |
| SeedData(app); | |
| //Seed Data | |
| void SeedData(IHost app) | |
| { | |
| var scopedFactory = app.Services.GetService<IServiceScopeFactory>(); | |
| using (var scope = scopedFactory.CreateScope()) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DataSeeder | |
| { | |
| private readonly EmployeeDbContext employeeDbContext; | |
| public DataSeeder(EmployeeDbContext employeeDbContext) | |
| { | |
| this.employeeDbContext = employeeDbContext; | |
| } | |
| public void Seed() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SecondSeleniumTest : IClassFixture<WebDriverFixture> | |
| { | |
| private readonly WebDriverFixture webDriverFixture; | |
| private readonly ITestOutputHelper testOutputHelper; | |
| public SecondSeleniumTest(WebDriverFixture webDriverFixture, ITestOutputHelper testOutputHelper) | |
| { | |
| this.webDriverFixture = webDriverFixture; | |
| this.testOutputHelper = testOutputHelper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace XUnitDemo | |
| { | |
| /// <summary> | |
| /// WebDriverFixture code for XUnit to handle | |
| /// Selenium WebDriver | |
| /// </summary> | |
| public class WebDriverFixture : IDisposable | |
| { | |
| public ChromeDriver ChromeDriver { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MiniDemo.Migrations | |
| { | |
| [DbContext(typeof(EmployeeDbContext))] | |
| [Migration("20210725025828_initialDb")] | |
| partial class initialDb | |
| { | |
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |
| { | |
| #pragma warning disable 612, 618 | |
| modelBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
| { | |
| var configuration = new ConfigurationBuilder() | |
| .SetBasePath(Directory.GetCurrentDirectory()) | |
| .AddJsonFile("appsettings.json") | |
| .Build(); | |
| var connectionString = configuration.GetConnectionString("AppDb"); | |
| optionsBuilder.UseSqlServer(connectionString); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint | |
| import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase | |
| import static com.kms.katalon.core.testdata.TestDataFactory.findTestData | |
| import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject | |
| import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject | |
| import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint | |
| import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW | |
| import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile | |
| import com.kms.katalon.core.model.FailureHandling as FailureHandling | |
| import com.kms.katalon.core.testcase.TestCase as TestCase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using ClearTextBoxAddon.Addons; | |
| using OpenQA.Selenium; | |
| using System.Threading; | |
| using TestProject.SDK; | |
| using TestProject.SDK.Drivers; | |
| namespace ClearTextBoxAddon | |
| { | |
| public class ClearTextBase | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using OpenQA.Selenium; | |
| using TestProject.Common.Attributes; | |
| using TestProject.SDK; | |
| using TestProject.SDK.Addons.ElementAction; | |
| using TestProject.SDK.Addons.Helpers; | |
| namespace ClearTextBoxAddon.Addons | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main.Addon; | |
| import io.testproject.java.annotations.v2.Action; | |
| import io.testproject.java.sdk.v2.addons.WebAction; | |
| import io.testproject.java.sdk.v2.addons.helpers.WebAddonHelper; | |
| import io.testproject.java.sdk.v2.drivers.WebDriver; | |
| import io.testproject.java.sdk.v2.enums.ExecutionResult; | |
| import io.testproject.java.sdk.v2.exceptions.FailureException; | |
| import org.openqa.selenium.By; |