This file contains 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 java.lang.reflect.Method; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
public class Main { | |
public static void main(String args[]){ | |
try{ | |
String pathToJar = args[0]; | |
System.out.println(pathToJar); | |
URL[] urls = { new URL("jar:file:" + pathToJar+"!/")}; |
This file contains 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 com.simplearchitect.lib; | |
public class LibrarySample { | |
public void execute() { | |
System.out.println("Hello World from Library."); | |
} | |
} |
This file contains 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 static class Orchestration | |
{ | |
private static TelemetryClient client; | |
static Orchestration() | |
{ | |
DependencyTrackingTelemetryModule module = new DependencyTrackingTelemetryModule(); | |
module.ExcludeComponentCorrelationHttpHeadersOnDomains.Add("core.windows.net"); | |
module.Initialize(TelemetryConfiguration.Active); |
This file contains 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
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# Please consider adding local content in /etc/sudoers.d/ instead of | |
# directly modifying this file. | |
# | |
# See the man page for details on how to write a sudoers file. | |
# | |
Defaults env_reset | |
Defaults mail_badpass | |
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" |
This file contains 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
{ | |
"extensions": { | |
"durableTask": { | |
"tracing": { | |
"DistributedTracingProtocol": "W3CTraceContext" | |
} | |
} | |
}, | |
"logging": { | |
"applicationInsights": { |
This file contains 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 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 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 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 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"; | |
} |