Search in sources :

Example 36 with DataProvider

use of org.testng.annotations.DataProvider in project rest.li by linkedin.

the class TestClientBuilders method batchWithParam.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "batchWithParam")
public Object[][] batchWithParam() {
    //Sample URIs:
    //"test?foo=bar&ids=1&ids=2"
    //"test?foo=bar&ids=List(1,2)"
    final Set<String> idSet = new HashSet<String>();
    idSet.add("1");
    idSet.add("2");
    final Map<String, String> queryParamsMap = new HashMap<String, String>();
    queryParamsMap.put("foo", "bar");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test", idSet, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test", idSet, queryParamsMap, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) HashMap(java.util.HashMap) ByteString(com.linkedin.data.ByteString) HashSet(java.util.HashSet) DataProvider(org.testng.annotations.DataProvider)

Example 37 with DataProvider

use of org.testng.annotations.DataProvider in project rest.li by linkedin.

the class TestClientBuilders method subSubResourceAction2.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "subSubResourceAction2")
public Object[][] subSubResourceAction2() {
    //Sample URIs:
    //"foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar/http%3A%2F%2Fexample.com%2Fimages%2F2.png/baz?action=action"
    //"foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar/http%3A%2F%2Fexample.com%2Fimages%2F2.png/baz?action=action"
    final Map<String, String> queryParamsMap = new HashMap<String, String>();
    queryParamsMap.put("action", "action");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar/http%3A%2F%2Fexample.com%2Fimages%2F2.png/baz", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar/http%3A%2F%2Fexample.com%2Fimages%2F2.png/baz", null, queryParamsMap, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) HashMap(java.util.HashMap) ByteString(com.linkedin.data.ByteString) DataProvider(org.testng.annotations.DataProvider)

Example 38 with DataProvider

use of org.testng.annotations.DataProvider in project rest.li by linkedin.

the class TestClientBuilders method singleEntity.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "singleEntity")
public Object[][] singleEntity() {
    //Sample URIs:
    //"test/1"
    //"test/1"
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/1", null, null, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/1", null, null, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) DataProvider(org.testng.annotations.DataProvider)

Example 39 with DataProvider

use of org.testng.annotations.DataProvider in project rest.li by linkedin.

the class TestClientBuilders method encodingEqualsAnd1.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "encodingEqualsAndValue")
public Object[][] encodingEqualsAnd1() {
    //Sample URIs:
    //"test/3?foo=bar%26baz%3Dqux"
    //"test/3?foo=bar%26baz%3Dqux"
    final Map<String, String> queryParamsMap = new HashMap<String, String>();
    queryParamsMap.put("foo", "bar&baz=qux");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "test/3", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "test/3", null, queryParamsMap, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) HashMap(java.util.HashMap) ByteString(com.linkedin.data.ByteString) DataProvider(org.testng.annotations.DataProvider)

Example 40 with DataProvider

use of org.testng.annotations.DataProvider in project rest.li by linkedin.

the class TestClientBuilders method simpleSubResourceAction2.

@DataProvider(name = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "simpleSubResourceAction2")
public Object[][] simpleSubResourceAction2() {
    //Sample URIs:
    //"foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar?action=action"
    //"foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar?action=action"
    final Map<String, String> queryParamsMap = new HashMap<String, String>();
    queryParamsMap.put("action", "action");
    final URIDetails uriDetails1 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_1_0_0.getProtocolVersion(), "foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar", null, queryParamsMap, null);
    final URIDetails uriDetails2 = new URIDetails(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion(), "foo/http%3A%2F%2Fexample.com%2Fimages%2F1.png/bar", null, queryParamsMap, null);
    return new Object[][] { { uriDetails1 }, { uriDetails2 } };
}
Also used : URIDetails(com.linkedin.restli.internal.testutils.URIDetails) HashMap(java.util.HashMap) ByteString(com.linkedin.data.ByteString) DataProvider(org.testng.annotations.DataProvider)

Aggregations

DataProvider (org.testng.annotations.DataProvider)391 SimpleInterval (org.broadinstitute.hellbender.utils.SimpleInterval)99 ArrayList (java.util.ArrayList)93 Test (org.testng.annotations.Test)85 File (java.io.File)74 List (java.util.List)72 Assert (org.testng.Assert)67 URIDetails (com.linkedin.restli.internal.testutils.URIDetails)65 Collectors (java.util.stream.Collectors)61 HashMap (java.util.HashMap)57 IntStream (java.util.stream.IntStream)54 Random (java.util.Random)50 RealMatrix (org.apache.commons.math3.linear.RealMatrix)44 BaseTest (org.broadinstitute.hellbender.utils.test.BaseTest)41 IOException (java.io.IOException)39 ByteString (com.linkedin.data.ByteString)37 Array2DRowRealMatrix (org.apache.commons.math3.linear.Array2DRowRealMatrix)34 Stream (java.util.stream.Stream)31 DoubleStream (java.util.stream.DoubleStream)29 HashSet (java.util.HashSet)28