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"; | |
} |
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 final class ParameterBinding { | |
private ParameterBinding() { | |
} | |
public TypedData getData() { | |
return null; | |
} | |
public String getName() { |
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 org.junit.*; | |
import mockit.*; | |
import static org.junit.Assert.assertEquals; | |
public class InvocationRequestTest { | |
@Mocked | |
private ParameterBinding binding; | |
@Test |
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
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 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 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() |
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
[CollectionDefinition("Non-Parallel Collection", DisableParallelization = true)] | |
public class NonParallelCollectionDefinitionClass | |
{ | |
} | |
[Collection("Non-Parallel Collection")] | |
public class SerialTest | |
{ | |
[Fact] | |
public async Task Test10() |
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
[Collection("Serial")] | |
public class SerialTest01 | |
{ | |
[Fact] | |
public async Task Test7() | |
{ | |
await Task.Delay(TimeSpan.FromSeconds(5)); | |
Assert.True(true); | |
} | |
} |