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
| { | |
| "IsEncrypted": false, | |
| "Values": { | |
| "AzureWebJobsStorage": "UseDevelopmentStorage=true", | |
| "FUNCTIONS_WORKER_RUNTIME": "dotnet", | |
| "APPINSIGHTS_INSTRUMENTATIONKEY": "<YOUR_APPINSGITHS_INSTRUMENTATIONKEY_HERE>" | |
| } | |
| } |
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
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <PropertyGroup> | |
| <TargetFramework>netcoreapp3.1</TargetFramework> | |
| <AzureFunctionsVersion>v3</AzureFunctionsVersion> | |
| <RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis> | |
| <RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask.Telemetry" Version="2.2.0-alpha" /> | |
| <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.5" /> |
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 SampleTest { | |
| @Test | |
| public void executeSample( | |
| @Mocked final TypedData data1, | |
| @Mocked final TypedData data2 | |
| ) throws Exception { | |
| new Expectations() {{ | |
| data1.getName(); result = "foo"; | |
| data2.getName(); result = "bar"; | |
| }}; |
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 SampleTest { | |
| @Test | |
| public void executeSample( | |
| @Mocked final TypedData data1, | |
| @Mocked final TypedData data2 | |
| ) throws Exception { | |
| new Expectations() {{ | |
| data1.getName(); result = "foo"; | |
| data2.getName(); result = "bar"; | |
| }}; |
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 InvocationRequestTest { | |
| @Mocked | |
| private ParameterBinding binding; | |
| @Test | |
| public void test(@Mocked final Some some) throws Exception { | |
| new Expectations() {{ | |
| binding.getName(); result = "ushio"; | |
| some.getName(); result = "mocked"; | |
| } |
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 final class ParameterBinding { | |
| private ParameterBinding() { | |
| } | |
| public TypedData getData() { | |
| return null; | |
| } | |
| public String getName() { |
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 org.junit.*; | |
| import mockit.*; | |
| import static org.junit.Assert.assertEquals; | |
| public class InvocationRequestTest { | |
| @Mocked | |
| private ParameterBinding binding; | |
| @Test |
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
| ExpectedStatus := "success" | |
| status := retry.DoWithRetry(t, "Waiting for DB connection validation...", 5, time.Duration(time.Second*5), | |
| func() (string, error) { | |
| output, err := k8s.RunKubectlAndGetOutputE(t, kubernetesOptions, "exec", psqlClientPodName, "--", "/bin/sh", "-c", fmt.Sprintf("PGPASSWORD=\"%s\" psql \"sslmode=require host=%s.postgres.database.azure.com dbname=%s user=%s@%s\";echo $?;", config.PGPassword, config.HostName, config.DBName, config.UserName, config.HostName)) | |
| if err != nil { | |
| return "", err | |
| } | |
| t.Log("PostgresClient:", output) | |
| if output == "0" { |
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.Threading.Tasks; | |
| using Xunit; | |
| namespace SerialAndParallelSpike | |
| { | |
| [CollectionDefinition("Non-Parallel Collection", DisableParallelization = true)] | |
| public class NonParallelCollectionDefinitionClass | |
| { | |
| } |
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
| [CollectionDefinition("Non-Parallel Collection", DisableParallelization = true)] | |
| public class NonParallelCollectionDefinitionClass | |
| { | |
| } | |
| [Collection("Non-Parallel Collection")] | |
| public class SerialTest | |
| { | |
| [Fact] | |
| public async Task Test10() |