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.IO; | |
void EncryptFile(string inputFile, string outputFile) | |
{ | |
using (var fin = new FileStream(inputFile, FileMode.Open)) | |
using (var fout = new FileStream(outputFile, FileMode.Create)) | |
{ | |
byte[] buffer = new byte[4096]; | |
while (true) | |
{ |
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 { sleep, group, check } from "k6"; | |
import http from "k6/http"; | |
export let options = { | |
thresholds: { | |
// 95% of requests must finish within 500 ms & 99% within 1500 ms | |
http_req_duration: ['p(95) < 500', 'p(99) < 1500'], | |
}, | |
}; |
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 System.Collections.Generic; | |
using System.IO; | |
using System.Net.Http; | |
using System.Text; | |
namespace FormUrlEncodedContentExample | |
{ | |
class Program | |
{ |
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 NUnit.Framework; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
using OpenQA.Selenium.Firefox; | |
using OpenQA.Selenium.Remote; | |
using System; | |
namespace Selenium_Examples | |
{ | |
[TestFixture(typeof(FirefoxOptions))] |
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
[TestFixture(typeof(FirefoxOptions))] | |
[TestFixture(typeof(ChromeOptions))] | |
[Parallelizable(ParallelScope.All)] | |
public class MultiSeleniumTest<TOptions> where TOptions : DriverOptions, new() | |
{ | |
[ThreadStatic] | |
private static IWebDriver driver; | |
[SetUp] | |
public void Setup() |
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 NUnit.Framework; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
using OpenQA.Selenium.Support.UI; | |
using System; | |
public class SeleniumTestsChrome | |
{ | |
private IWebDriver driver; |
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 NUnit.Framework; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
using System; | |
public class SeleniumTests | |
{ | |
IWebDriver driver; | |
[SetUp] |
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
[Test] | |
public void Test_XECom_EurBgnCourse_ByKeyboard() | |
{ | |
driver.Navigate().GoToUrl("https://xe.com"); | |
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); | |
// Choose amount "1" | |
driver.FindElement(By.CssSelector("input#amount")).Click(); | |
driver.FindElement(By.CssSelector("input#amount")).SendKeys("1"); |
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 com.mashape.unirest.http.JsonNode; | |
import com.mashape.unirest.http.Unirest; | |
import com.mashape.unirest.http.exceptions.UnirestException; | |
import junit.framework.*; | |
import org.json.JSONObject; | |
public class JUnitTest extends TestCase { | |
protected void setUp(){ | |
} |
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 NUnit.Framework; | |
using RestSharp; | |
using RestSharp.Authenticators; | |
using RestSharp.Serialization.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Net; | |
namespace API_Tests_GitHub | |
{ |