input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldNotAppendWhereConditionIfEmpty ( ) { java . lang . String selectClause = uniqueString ( ) ; java . lang . String fromClause = uniqueString ( ) ; setupSelectAndFromClause ( selectClause , fromClause ) ; given ( whereClauseSqlGenerator . whereConditions ( eq ( queryData ) , eq ( alternative ) , anyString ( ) ) ) . ... | org . junit . Assert . assertThat ( sql , org . hamcrest . CoreMatchers . is ( expected ) ) |
confirmVersion ( ) { "<AssertPlaceHolder>" ; } getVersion ( ) { return com . simpligility . maven . plugins . androidndk . PluginInfo . version ; } | org . junit . Assert . assertNotNull ( com . simpligility . maven . plugins . androidndk . PluginInfo . getVersion ( ) ) |
testCallRegisterOnceTwice ( ) { java . lang . String resource = "path/to/resource" ; final byte [ ] bytes = new byte [ ] { 1 , 2 , 3 } ; final java . util . ArrayList < java . lang . Boolean > log = new java . util . ArrayList < java . lang . Boolean > ( ) ; org . eclipse . rap . rwt . service . ResourceLoader loader =... | org . junit . Assert . assertEquals ( 1 , log . size ( ) ) |
testPrePostArjunEmail ( ) { theory . intervals . UnaryCharIntervalSolver ba = new theory . intervals . UnaryCharIntervalSolver ( ) ; transducers . sst . SST < theory . characters . CharPred , theory . characters . CharFunc , java . lang . Character > sst = getSTTArjun ( ba ) ; automata . sfa . SFA < theory . characters... | org . junit . Assert . assertTrue ( ( ! ( pre . isEmpty ( ) ) ) ) |
testDispatchDuringDispatch ( ) { final react . Signal < java . lang . Integer > signal = react . Signal . create ( ) ; react . SignalTest . AccSlot < java . lang . Integer > counter = new react . SignalTest . AccSlot < java . lang . Integer > ( ) ; signal . connect ( counter ) ; signal . connect ( new react . Slot < ja... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 5 , 10 ) , counter . events ) |
testCreateIfNotExistsNull ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . Foo , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . Foo . class , true ) ; "<AssertPlaceHolder>" ; } createIfNotExists ( T ) { if ( data == null ) { return null ; } T existing = queryForSameId ( data... | org . junit . Assert . assertNull ( dao . createIfNotExists ( null ) ) |
testGetVolume ( ) { com . bixly . pastevid . recorders . RecorderTest . log ( "getVolume" ) ; com . bixly . pastevid . recorders . Recorder instance = new com . bixly . pastevid . recorders . Recorder ( new com . bixly . pastevid . recorders . RecorderTest . TestMeasurable ( ) ) ; int expResult = 0 ; int result = insta... | org . junit . Assert . assertTrue ( ( result >= expResult ) ) |
testDontCancelOnErrorWithAnnotation ( ) { org . databene . contiperf . junit . ContiPerfRuleTest . TestBean test = new org . databene . contiperf . junit . ContiPerfRuleTest . TestBean ( ) ; check ( test , "dontCancelOnErrorWithAnnotation" ) ; int count = test . dontCancelOnErrorWithAnnotation . get ( ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( 100 , count ) |
literalEqualType ( ) { final org . apache . commons . rdf . jsonldjava . JsonLdLiteral lit1 = rdf . createLiteral ( "1" , Types . XSD_INTEGER ) ; final org . apache . commons . rdf . jsonldjava . JsonLdLiteral lit2 = rdf . createLiteral ( "1" , Types . XSD_INTEGER ) ; "<AssertPlaceHolder>" ; } createLiteral ( java . la... | org . junit . Assert . assertEquals ( lit1 , lit2 ) |
testHighlightFirst ( ) { java . lang . String term = "Bart<sp>Simpson" ; java . lang . String publication = "<p>Bart<sp>Simpson<sp>is<sp>the<sp>cooleast<sp>sk8ter<sp>in<sp>the<sp>world.<sp>Miss<sp>Krabappel<sp>doesn't<sp>see<sp>le<sp>good<sp>part<sp>in<sp>Bart<sp>Simpson.</p>" ; java . lang . String definition = "Skatt... | org . junit . Assert . assertEquals ( expResult , result ) |
testDelete ( ) { currentTable = ( tbl_test ) + "Delete" ; insertTestValues ( currentTable ) ; cleanupEntities ( currentTable ) ; org . talend . components . api . component . runtime . BoundedReader reader = createReader ( currentTable , filter , false ) ; "<AssertPlaceHolder>" ; reader . close ( ) ; } start ( ) { star... | org . junit . Assert . assertFalse ( reader . start ( ) ) |
test_empty_list ( ) { java . lang . String str = "SELECT<sp>*<sp>WHERE<sp>{<sp>VALUES<sp>(?o)<sp>{?objs}<sp>?s<sp>?p<sp>?o<sp>}" ; org . apache . jena . query . ParameterizedSparqlString pss = new org . apache . jena . query . ParameterizedSparqlString ( str ) ; java . util . List < org . apache . jena . query . RDFNod... | org . junit . Assert . assertEquals ( exp , res ) |
testDefineLigand_ImplicitHydrogen ( ) { org . openscience . cdk . interfaces . IAtomContainer molecule = org . openscience . cdk . geometry . cip . CIPToolTest . smiles . parseSmiles ( "CC(C)C(C#N)(C(=C)C)" ) ; org . openscience . cdk . geometry . cip . ILigand ligand = org . openscience . cdk . geometry . cip . CIPToo... | org . junit . Assert . assertTrue ( ( ligand instanceof org . openscience . cdk . geometry . cip . ImplicitHydrogenLigand ) ) |
shouldSerializeCollectionWithPrefixTag ( ) { java . lang . String expectedResult = "{\"price\":15.0,\"comments\":\"pack<sp>it<sp>nicely,<sp>please\"}" ; expectedResult += ',' + expectedResult ; expectedResult = ( "{\"orders\":[" + expectedResult ) + "]}" ; br . com . caelum . vraptor . serialization . gson . GsonJSONSe... | org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) ) |
test ( ) { final org . tinyradius . attribute . IntegerAttribute intAttr = new org . tinyradius . attribute . IntegerAttribute ( 27 , 0 ) ; final long bigValue = 4294967295L ; System . err . println ( ( ( int ) ( bigValue ) ) ) ; System . err . println ( bigValue ) ; final java . lang . String bigValueSt = java . lang ... | org . junit . Assert . assertEquals ( bigValueSt , intAttr . getAttributeValue ( ) ) |
getAllToContact_test ( ) { fr . mycellar . domain . contact . Contact contact = new fr . mycellar . domain . contact . Contact ( ) ; contact . setCurrent ( new org . joda . time . LocalDate ( ) . minusDays ( 3 ) ) ; contact . setNext ( new org . joda . time . LocalDate ( ) . plusDays ( 3 ) ) ; contact . setProducer ( e... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( contact ) , jpaContactRepository . getAllToContact ( ) ) |
testInferredFreeFlowing ( ) { org . locationtech . jts . geom . Coordinate a = new org . locationtech . jts . geom . Coordinate ( ( - 73.990989 ) , 40.750167 ) ; org . locationtech . jts . geom . Coordinate b = new org . locationtech . jts . geom . Coordinate ( ( - 73.988049 ) , 40.749094 ) ; org . locationtech . jts .... | org . junit . Assert . assertEquals ( 0.0 , traversalCost , 0.0 ) |
testCombinedSize ( ) { gov . llnl . ontology . util . Set < java . lang . String > set1 = new gov . llnl . ontology . util . HashSet < java . lang . String > ( ) ; for ( java . lang . String s : gov . llnl . ontology . util . CombinedSetTest . array1 ) set1 . add ( s ) ; gov . llnl . ontology . util . Set < java . lang... | org . junit . Assert . assertEquals ( 6 , combined . size ( ) ) |
shouldCreateIteratorOverValuesWhenSuppliedIteratorOfUnknownObjects ( ) { java . util . List < java . lang . String > values = new java . util . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i != 10 ; ++ i ) values . add ( ( "<sp>" + i ) ) ; java . util . Iterator < java . lang . Long > iter = factory . cre... | org . junit . Assert . assertThat ( iter . next ( ) , org . hamcrest . core . Is . is ( factory . create ( valueIter . next ( ) ) ) ) |
testWithEscapeDisabled ( ) { final com . orangesignal . csv . CsvConfig cfg = new com . orangesignal . csv . CsvConfig ( ) ; cfg . withEscapeDisabled ( false ) ; "<AssertPlaceHolder>" ; } isEscapeDisabled ( ) { return escapeDisabled ; } | org . junit . Assert . assertThat ( cfg . isEscapeDisabled ( ) , org . hamcrest . core . Is . is ( false ) ) |
testReadWriteLong ( ) { java . io . File file = new java . io . File ( getDirectory ( ) , "test" ) ; for ( int i = 0 ; i < 10 ; i ++ ) { com . github . zk1931 . jzab . FileUtils . writeLongToFile ( i , file ) ; "<AssertPlaceHolder>" ; } } readLongFromFile ( java . io . File ) { try ( java . io . FileInputStream fis = n... | org . junit . Assert . assertEquals ( i , com . github . zk1931 . jzab . FileUtils . readLongFromFile ( file ) ) |
testCountByG_U_R_F_M_StatusInTrash_BothRepositories ( ) { com . liferay . portal . kernel . dao . orm . QueryDefinition < com . liferay . document . library . kernel . model . DLFileEntry > queryDefinition = new com . liferay . portal . kernel . dao . orm . QueryDefinition ( ) ; queryDefinition . setStatus ( WorkflowCo... | org . junit . Assert . assertEquals ( 4 , doCountBy_G_U_R_F_M_BothRepositories ( 0 , null , queryDefinition ) ) |
twoOccurrences ( ) { opennlp . tools . util . Span [ ] spans = es . ehu . si . ixa . pipe . nerc . DictionariesNameFinderTest . finder . nercToSpansExact ( new java . lang . String [ ] { "Achilles" , "Apollo" , "Zeus" , "Achilles" } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , spans . length ) |
validateSetTezJarLocalResourcesDefinedExistingDirectoryIgnoredSetToFalse ( ) { java . net . URL [ ] cp = ( ( java . net . URLClassLoader ) ( java . lang . ClassLoader . getSystemClassLoader ( ) ) ) . getURLs ( ) ; java . lang . StringBuffer buffer = new java . lang . StringBuffer ( ) ; for ( java . net . URL url : cp )... | org . junit . Assert . assertFalse ( localizedMap . isEmpty ( ) ) |
test_setParentLorg_eclipse_swt_widgets_Composite ( ) { if ( control . isReparentable ( ) ) { org . eclipse . swt . widgets . Shell originalParent = new org . eclipse . swt . widgets . Shell ( ) ; org . eclipse . swt . widgets . Shell newParent = new org . eclipse . swt . widgets . Shell ( ) ; org . eclipse . swt . widg... | org . junit . Assert . assertFalse ( b . isDisposed ( ) ) |
testUnsettableReferenceUnset ( ) { org . eclipselabs . mongoemf . junit . model . PrimaryObject primaryObject = ModelFactory . eINSTANCE . createPrimaryObject ( ) ; saveObject ( primaryObject ) ; org . eclipse . emf . ecore . resource . ResourceSet resourceSet = createResourceSet ( ) ; org . eclipse . emf . ecore . res... | org . junit . Assert . assertFalse ( object . isSetUnsettableReference ( ) ) |
testExistingEquals ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "import<sp>org.eclipse.xtend.lib.annotations.Data" ) ; _builder . newLine ( ) ; _builder . append ( "@Data<sp>class<sp>Foo<sp>{" ) ; _builder . ne... | org . junit . Assert . assertEquals ( java . lang . Boolean . valueOf ( true ) , equals . invoke ( instance , java . lang . Integer . valueOf ( 1 ) ) ) |
testFusedMappersObjectReuseBug ( ) { org . apache . crunch . Pipeline pipeline = new org . apache . crunch . impl . mr . MRPipeline ( org . apache . crunch . MultipleOutputIT . class , tmpDir . getDefaultConfiguration ( ) ) ; org . apache . crunch . PCollection < org . apache . crunch . test . StringWrapper > stringWra... | org . junit . Assert . assertEquals ( 1 , pipelineResult . getStageResults ( ) . size ( ) ) |
testNotNotificationString_assertFalse ( ) { new org . nhindirect . common . tx . impl . RESTTxServiceClient_suppressNotificationTest . TestPlan < org . nhindirect . common . tx . model . Tx > ( ) { @ org . nhindirect . common . tx . impl . Override protected boolean suppressNotification ( org . nhindirect . common . tx... | org . junit . Assert . assertFalse ( b ) |
testLog ( ) { org . nd4j . linalg . api . ndarray . INDArray log = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 6 , 6 ) ; org . nd4j . linalg . api . ndarray . INDArray transformed = org . nd4j . linalg . ops . transforms . Transforms . log ( log ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = o... | org . junit . Assert . assertEquals ( assertion , transformed ) |
testCreate_8 ( ) { java . io . File testFile = new java . io . File ( getClass ( ) . getResource ( "test_L8_MTL.txt" ) . getFile ( ) ) ; org . esa . beam . dataio . landsat . geotiff . LandsatMetadata landsatMetadata = org . esa . beam . dataio . landsat . geotiff . LandsatMetadataFactory . create ( testFile ) ; "<Asse... | org . junit . Assert . assertTrue ( ( landsatMetadata instanceof org . esa . beam . dataio . landsat . geotiff . Landsat8Metadata ) ) |
testFilterParsesContextFromHeaderToBackend ( ) { headers . putSingle ( TraceeConstants . TPIC_HEADER , "foo=bar" ) ; unit . filter ( null , clientResponseContext ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { if ( ( key != null ) && ( traceeKeys . get ( ) . contains ( key ) ) ) return org . slf4j . MDC . ... | org . junit . Assert . assertThat ( backend . get ( "foo" ) , org . hamcrest . Matchers . equalTo ( "bar" ) ) |
whenCreatedFromMapWithoutInternalDebugHttpPort_hasEmptyString ( ) { oracle . kubernetes . operator . helm . HelmOperatorValues values = new oracle . kubernetes . operator . helm . HelmOperatorValues ( com . google . common . collect . ImmutableMap . of ( ) ) ; "<AssertPlaceHolder>" ; } getInternalDebugHttpPort ( ) { re... | org . junit . Assert . assertThat ( values . getInternalDebugHttpPort ( ) , org . hamcrest . Matchers . equalTo ( "" ) ) |
testGetDoublePosition ( ) { final long [ ] initial = new long [ ] { 532 , 632 , 987421 } ; final net . imglib2 . Point p = new net . imglib2 . Point ( initial ) ; for ( int i = 0 ; i < ( initial . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getDoublePosition ( int ) { return source . getDoublePosition ( d ) ; } | org . junit . Assert . assertEquals ( initial [ i ] , p . getDoublePosition ( i ) , 0 ) |
testRemoveSpecificQueryNullQuery ( ) { java . lang . String alias = "get_dataobject_ids" ; org . irods . jargon . core . pub . domain . SpecificQueryDefinition specificQuery = new org . irods . jargon . core . pub . domain . SpecificQueryDefinition ( null , alias ) ; org . irods . jargon . core . packinstr . GeneralAdm... | org . junit . Assert . assertNotNull ( pi ) |
testIntVector ( ) { int [ ] ints = new int [ ] { 1 , 2 , 3 } ; org . dcache . oncrpc4j . xdr . Xdr xdr = new org . dcache . oncrpc4j . xdr . Xdr ( 128 ) ; xdr . beginEncoding ( ) ; xdr . xdrEncodeIntVector ( ints ) ; xdr . endEncoding ( ) ; xdr = new org . dcache . oncrpc4j . xdr . Xdr ( xdr . getBytes ( ) ) ; xdr . be... | org . junit . Assert . assertArrayEquals ( ints , decoded ) |
testCreateUIWithoutGhostController ( ) { org . junit . Assume . assumeTrue ( org . jpacman . framework . ui . MainUI . class . desiredAssertionStatus ( ) ) ; boolean gotException = false ; mainUI . initialize ( ) ; try { mainUI . createUI ( ) ; } catch ( java . lang . AssertionError ae ) { gotException = true ; } "<Ass... | org . junit . Assert . assertTrue ( gotException ) |
cloneDoesNotObserveWritesToOriginal ( ) { okio . Buffer original = new okio . Buffer ( ) ; okio . Buffer clone = original . clone ( ) ; original . writeUtf8 ( "abc" ) ; "<AssertPlaceHolder>" ; } size ( ) { org . junit . Assert . assertEquals ( 0 , okio . Utf8 . size ( "" ) ) ; org . junit . Assert . assertEquals ( 3 , ... | org . junit . Assert . assertEquals ( 0 , clone . size ( ) ) |
testPatientHasTasksClosedInInterval ( ) { final java . util . Set < com . marand . thinkmed . medications . TaskTypeEnum > taskTypes = java . util . Collections . singleton ( TaskTypeEnum . PERFUSION_SYRINGE_DISPENSE ) ; setUpMocksForPerfusionSyringeTestForSingleValue ( ) ; final boolean hasTasksClosedInInterval = phar... | org . junit . Assert . assertTrue ( hasTasksClosedInInterval ) |
shouldLogError ( ) { processingLogger . error ( msgFactory ) ; final org . apache . kafka . connect . data . SchemaAndValue msg = verifyErrorMessage ( ) ; "<AssertPlaceHolder>" ; } verifyErrorMessage ( ) { verify ( innerLogger ) . error ( msgCaptor . capture ( ) ) ; return msgCaptor . getValue ( ) . get ( ) ; } | org . junit . Assert . assertThat ( msg , org . hamcrest . Matchers . is ( this . msg ) ) |
testGetOldValue ( ) { tlsContext . setSelectedProtocolVersion ( ProtocolVersion . TLS12 ) ; action . execute ( state ) ; "<AssertPlaceHolder>" ; } getOldValue ( ) { return oldValue ; } | org . junit . Assert . assertEquals ( action . getOldValue ( ) , ProtocolVersion . TLS12 ) |
testFindUser_null_user ( ) { when ( jdbcTemplate . queryForObject ( anyString ( ) , ( ( org . springframework . jdbc . core . RowMapper ) ( anyObject ( ) ) ) , isNull ( ) ) ) . thenReturn ( User . NULL_USER ) ; com . captaindebug . cargocult . User result = instance . findUser ( null ) ; "<AssertPlaceHolder>" ; } findU... | org . junit . Assert . assertEquals ( User . NULL_USER , result ) |
write ( ) { java . util . UUID uuid = java . util . UUID . randomUUID ( ) ; org . msgpack . MessagePack pack = new org . msgpack . MessagePack ( ) ; byte [ ] bytes = pack . write ( uuid . toString ( ) ) ; byte [ ] result = pack . write ( uuid , cocaine . msgpack . UUIDTemplate . getInstance ( ) ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertArrayEquals ( bytes , result ) |
destroyCalledWithBeanCreate ( org . jboss . weld . manager . BeanManagerImpl ) { SomeBean . destroyCalled = false ; java . util . Set < javax . enterprise . inject . spi . Bean < ? > > beans = beanManager . getBeans ( org . jboss . weld . tests . beanManager . predestroy . SomeBean . class ) ; javax . enterprise . inje... | org . junit . Assert . assertTrue ( SomeBean . destroyCalled ) |
testKeepDimsShape_3_T ( ) { lombok . val shape = new int [ ] { 1 , 1 } ; lombok . val axis = new int [ ] { 1 , 0 , 1 } ; lombok . val result = org . nd4j . linalg . api . shape . Shape . getReducedShape ( shape , axis , true , true ) ; "<AssertPlaceHolder>" ; } getReducedShape ( int [ ] , int [ ] , boolean , boolean ) ... | org . junit . Assert . assertArrayEquals ( new long [ ] { 1 , 1 } , result ) |
test_get_mapping_configuration_by_configuration_type_id ( ) { java . util . List < org . ikasan . mapping . service . MappingConfiguration > mappingConfigurations = this . xaMappingConfigurationDao . getAllMappingConfigurations ( ) ; for ( org . ikasan . mapping . service . MappingConfiguration mappingConfiguration : m... | org . junit . Assert . assertTrue ( ids . contains ( mappingConfiguration . getId ( ) ) ) |
applyGeenHistorieGroep ( ) { nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder groepBuilder = new nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder ( null ) ; groepBuilder . metGroepElement ( Element . ADMINISTRATIEVEHANDELING_IDENTITEIT . getId ( ) ) ; final nl . bzk . brp . domain . leveringmo... | org . junit . Assert . assertThat ( apply , org . hamcrest . core . Is . is ( true ) ) |
testConfigureEnableGrouping ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSICKANSink.configure]" ) ) + "--------<sp>enable_grouping<sp>can<sp>only<sp>be<sp>'true'<sp>or<sp>'false'" ) ) ; java . lang . String apiKey = null ; java . lang . String attrPersistence = null ; java . lang . String backendMaxConns =... | org . junit . Assert . assertTrue ( sink . getInvalidConfiguration ( ) ) |
equalsContent_shouldIndicateUnequalWhenOnlyPostalCodeDiffers ( ) { org . openmrs . PersonAddress address1 = new org . openmrs . PersonAddress ( ) ; org . openmrs . PersonAddress address2 = new org . openmrs . PersonAddress ( ) ; address2 . setPostalCode ( "99999" ) ; address1 . setPostalCode ( "243234" ) ; "<AssertPlac... | org . junit . Assert . assertThat ( address2 . equalsContent ( address1 ) , org . hamcrest . CoreMatchers . is ( false ) ) |
withFour ( ) { "<AssertPlaceHolder>" ; } debug ( int ) { return ( n & ( n - 1 ) ) == 0 ; } | org . junit . Assert . assertTrue ( s . debug ( 4 ) ) |
testGetDeviceBy64BitAddrEmptyNetwork ( ) { com . digi . xbee . api . models . XBee64BitAddress address = new com . digi . xbee . api . models . XBee64BitAddress ( "0123456789ABCDEF" ) ; com . digi . xbee . api . RemoteXBeeDevice found = network . getDevice ( address ) ; "<AssertPlaceHolder>" ; } getDevice ( com . digi ... | org . junit . Assert . assertNull ( found ) |
testSetAndGetConnectionString ( ) { java . lang . String name = "test" ; com . ctrip . platform . dal . dao . configure . DataSourceConfigureLocator locator = com . ctrip . platform . dal . dao . configure . DataSourceConfigureLocatorManager . getInstance ( ) ; com . ctrip . platform . dal . dao . configure . DalConnec... | org . junit . Assert . assertEquals ( connectionString , connectionString2 ) |
setMethodNameSetsTheMethodName ( ) { java . lang . String methodNameStr = "abcdefg" ; byte [ ] data = new byte [ 1 ] ; com . microsoft . azure . sdk . iot . device . MessageType messageType = com . microsoft . azure . sdk . iot . device . MessageType . DEVICE_TWIN ; com . microsoft . azure . sdk . iot . device . transp... | org . junit . Assert . assertEquals ( methodNameStr , iotHubTransportMessage . getMethodName ( ) ) |
test4s ( ) { java . util . Map < java . util . List < java . lang . Integer > , java . lang . Integer > graph4 = new java . util . HashMap ( ) ; graph4 . put ( new java . util . ArrayList < java . lang . Integer > ( java . util . Arrays . asList ( 0 , 1 ) ) , 3 ) ; graph4 . put ( new java . util . ArrayList < java . la... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 2 ) ) , length_by_path . get ( edge ) ) |
testInputConnectorGetAllSchemaPropertiesConnectors ( ) { java . util . Set < org . talend . components . api . component . PropertyPathConnector > propertyPathConnectors = properties . getAllSchemaPropertiesConnectors ( false ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( tokenName . getValue ( ) ) == null ) { return ... | org . junit . Assert . assertEquals ( 1 , propertyPathConnectors . size ( ) ) |
testIsFound ( ) { "<AssertPlaceHolder>" ; } isFound ( ) { return found ; } | org . junit . Assert . assertEquals ( found , entry . isFound ( ) ) |
testDeleteDir_InexistentDir ( ) { java . lang . String outputDir = utils . getOutputDirectory ( ) ; java . lang . String testDir = outputDir + "a" ; java . io . File dir = new java . io . File ( testDir ) ; org . matsim . core . utils . io . IOUtils . deleteDirectoryRecursively ( dir . toPath ( ) ) ; "<AssertPlaceHolde... | org . junit . Assert . assertFalse ( dir . exists ( ) ) |
testLinearROI ( ) { double xStart = 10.23 ; double xStop = 34.25 ; double yStart = - 12.3 ; double yStop = 11.4 ; org . eclipse . dawnsci . analysis . dataset . roi . LinearROI linearROI = new org . eclipse . dawnsci . analysis . dataset . roi . LinearROI ( new double [ ] { xStart , yStart } , new double [ ] { xStop , ... | org . junit . Assert . assertEquals ( expected , actual ) |
testMaxRecommended ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . setInt ( PartitionUtils . MAX_REDUCERS , 400 ) ; when ( pcollection . getSize ( ) ) . thenReturn ( ( ( ( 1000 * 1000L ) * 1000L ) * 1000L ) ) ; when ( pcollection . getPipeline ( ) ... | org . junit . Assert . assertEquals ( 400 , org . apache . crunch . util . PartitionUtils . getRecommendedPartitions ( pcollection ) ) |
testReadPKCS1 ( ) { java . lang . String keyFile = "keys/pkcs1-unencrypted.pem" ; try ( java . io . InputStream keyStream = cl . getResourceAsStream ( keyFile ) ; java . io . Reader expectedReader = new java . io . InputStreamReader ( cl . getResourceAsStream ( keyFile ) ) ) { java . security . PrivateKey actualKey = c... | org . junit . Assert . assertEquals ( actualKey , expectedKey ) |
testCalendarOnInvalidType ( ) { org . simpleflatmapper . reflect . Getter < org . simpleflatmapper . jdbc . test . impl . getter . ResultSet , org . simpleflatmapper . jdbc . test . impl . getter . Calendar > getter = factory . < org . simpleflatmapper . jdbc . test . impl . getter . Calendar > newGetter ( org . simple... | org . junit . Assert . assertNull ( getter ) |
testReadAllWithSmallSize ( ) { for ( int i = 10 ; i <= 10000 ; i *= 10 ) { byte [ ] input = randomBytes ( i ) ; byte [ ] output = edu . umd . cs . findbugs . io . IO . readAll ( new java . io . ByteArrayInputStream ( input ) , ( i - 9 ) ) ; "<AssertPlaceHolder>" ; } } readAll ( java . io . InputStream , int ) { try { i... | org . junit . Assert . assertArrayEquals ( input , output ) |
testBuildImage_registryUnauthorizedException_noCredentials ( ) { org . mockito . Mockito . when ( mockRegistryUnauthorizedException . getHttpResponseException ( ) ) . thenReturn ( mockHttpResponseException ) ; org . mockito . Mockito . when ( mockRegistryUnauthorizedException . getRegistry ( ) ) . thenReturn ( "somereg... | org . junit . Assert . assertEquals ( com . google . cloud . tools . jib . plugins . common . BuildStepsRunnerTest . TEST_HELPFUL_SUGGESTIONS . forNoCredentialsDefined ( "someregistry" , "somerepository" ) , ex . getMessage ( ) ) |
verifySubclassed ( ) { final java . util . Map < java . lang . String , java . lang . String > typesForNames = geoapi . typesForNames ( ) ; hasSubTypes . values ( ) . removeIf ( ( v ) -> ! v ) ; if ( ! ( hasSubTypes . keySet ( ) . equals ( geoapi . subclassed ( ) ) ) ) { final java . lang . String [ ] parentTypes = new... | org . junit . Assert . assertEquals ( parentTypes . length , i ) |
testEndsWithExpressionNegative ( ) { org . odata4j . expression . BoolMethodExpression ex = org . odata4j . expression . Expression . endsWith ( org . odata4j . expression . Expression . string ( "ABCDE" ) , org . odata4j . expression . Expression . string ( "CD" ) ) ; boolean evaluate = org . odata4j . producer . inme... | org . junit . Assert . assertFalse ( evaluate ) |
setSoutheast_whenCreatingAndNoCornersAreSet_shouldSetCorner2AtBottom ( ) { org . bukkit . World worldMock = mock ( org . bukkit . World . class ) ; com . tommytony . war . Warzone zoneMock = mock ( com . tommytony . war . Warzone . class ) ; when ( zoneMock . getTeams ( ) ) . thenReturn ( new java . util . ArrayList < ... | org . junit . Assert . assertEquals ( movedOne , volume . getCornerTwo ( ) ) |
testCanNotRepeatMissingStructure ( ) { uk . gov . dstl . baleen . uima . utils . SelectorPath minimal = uk . gov . dstl . baleen . uima . utils . SelectorPath . parse ( "Table" ) ; uk . gov . dstl . baleen . annotators . templates . RepeatSearch repeatSearch = new uk . gov . dstl . baleen . annotators . templates . Rep... | org . junit . Assert . assertFalse ( recordStructureManager . repeatRecord ( structure , repeatSearch , true ) . isPresent ( ) ) |
disableFeignTracing ( ) { org . springframework . context . annotation . AnnotationConfigApplicationContext context = new org . springframework . context . annotation . AnnotationConfigApplicationContext ( ) ; context . register ( io . opentracing . contrib . spring . cloud . feign . FeignTracingAutoConfigurationTest .... | org . junit . Assert . assertThat ( feignContextBeans . length , org . hamcrest . Matchers . is ( 0 ) ) |
testParseActionMapErr ( ) { queriesString = "type=node&enabled=true&status=established&actions=port01" ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowQuery ( queriesString ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( o... | org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
ToRelationnullNullOProperty ( ) { org . odata4j . core . OProperty < ? > expected = org . odata4j . core . OProperties . null_ ( SentMessage . P_TO_RELATION . getName ( ) , EdmSimpleType . STRING ) ; org . odata4j . core . OProperty < ? > result = this . setDefaultValue ( SentMessage . P_TO_RELATION . build ( ) , SentM... | org . junit . Assert . assertEquals ( expected . getValue ( ) , result . getValue ( ) ) |
testOverlapping ( ) { org . hibernate . tool . internal . reveng . OverrideRepository or = new org . hibernate . tool . internal . reveng . OverrideRepository ( ) ; or . addSchemaSelection ( new org . hibernate . tool . api . reveng . SchemaSelection ( null , "OVRTEST" ) ) ; or . addSchemaSelection ( new org . hibernat... | org . junit . Assert . assertEquals ( 4 , tables . size ( ) ) |
testReadFully ( ) { for ( int i = 0 ; i < ( bytes . capacity ( ) ) ; i ++ ) bytes . write ( i ) ; bytes . position ( 0 ) ; byte [ ] bytes = new byte [ ( ( int ) ( this . bytes . capacity ( ) ) ) ] ; this . bytes . readFully ( bytes ) ; for ( int i = 0 ; i < ( this . bytes . capacity ( ) ) ; i ++ ) "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( ( ( byte ) ( i ) ) , bytes [ i ] ) |
testPutEndpointEntry ( ) { com . aliyuncs . DefaultAcsClient client = mock ( com . aliyuncs . DefaultAcsClient . class ) ; com . aliyuncs . profile . DefaultProfile profile = mock ( com . aliyuncs . profile . DefaultProfile . class ) ; when ( profile . isUsingVpcEndpoint ( ) ) . thenReturn ( false ) ; when ( profile . ... | org . junit . Assert . assertEquals ( "userCustomized-ecs.aliyuncs.com" , resolver . resolve ( request ) ) |
testToJson ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createTimeStamp ( org . apache . tajo . datum . TestTimestampDatum . timestamp ) ; org . apache . tajo . datum . Datum copy = org . apache . tajo . json . CommonGsonHelper . fromJson ( d . toJson ( ) , org . apache . t... | org . junit . Assert . assertEquals ( d , copy ) |
deveObterInfoCancelamentoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFRetornoCancelamento cancelamento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFRetornoCancelamento ( ) ; final com . fincatto . documentofiscal . nfe... | org . junit . Assert . assertEquals ( infoCancelamento , cancelamento . getInfoCancelamento ( ) ) |
testInterceptionServlet_withKarafEtc_overrideBanner ( ) { javax . servlet . http . HttpServletResponse resp = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletResponse . class ) ; org . mockito . Mockito . when ( resp . getOutputStream ( ) ) . thenReturn ( org . mockito . Mockito . mock ( javax . se... | org . junit . Assert . assertTrue ( f . exists ( ) ) |
testBug51544Direct ( ) { javax . el . ExpressionFactory factory = javax . el . ExpressionFactory . newInstance ( ) ; javax . el . ELContext context = new org . apache . jasper . el . ELContextImpl ( ) ; java . util . List < ? > list = java . util . Collections . emptyList ( ) ; javax . el . ValueExpression var = factor... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , result ) |
testGetXMPWithValidImageNotContainingXMP ( ) { java . nio . file . Path file = edu . illinois . library . cantaloupe . test . TestUtil . getImage ( "gif" ) ; try ( javax . imageio . stream . ImageInputStream is = javax . imageio . ImageIO . createImageInputStream ( file . toFile ( ) ) ) { instance . setSource ( is ) ; ... | org . junit . Assert . assertNull ( instance . getXMP ( ) ) |
testNoGroupBy ( ) { final java . lang . String xml = "/net/meisen/dissertation/impl/parser/query/testPersonModel.xml" ; final java . lang . String query = "select<sp>timeseries<sp>from<sp>testPersonModel<sp>in<sp>[03.03.2014,05.03.2014)" ; m ( xml ) ; final net . meisen . dissertation . impl . parser . query . select .... | org . junit . Assert . assertNull ( res . getGroupResult ( ) ) |
cannotHeartbeatLockYouDontOwn ( ) { final com . amazonaws . services . dynamodbv2 . LockItem item = this . lockClient . acquireLock ( com . amazonaws . services . dynamodbv2 . ACQUIRE_LOCK_OPTIONS_TEST_KEY_1 ) ; "<AssertPlaceHolder>" ; final com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient lockClient2... | org . junit . Assert . assertEquals ( item . getPartitionKey ( ) , "testKey1" ) |
shouldReturnFalseWhenValidatingPatternWithHigherNumberOfTransitions ( ) { java . lang . String invalidPattern = com . mifmif . common . regex . GenerexUnitTest . createPatternWithTransitions ( 1000000 ) ; boolean valid = com . mifmif . common . regex . Generex . isValidPattern ( invalidPattern ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertThat ( valid , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( false ) ) ) |
testConstructor ( ) { org . openscience . cdk . stereo . DoubleBondStereochemistry stereo = new org . openscience . cdk . stereo . DoubleBondStereochemistry ( org . openscience . cdk . stereo . DoubleBondStereochemistryTest . molecule . getBond ( 1 ) , org . openscience . cdk . stereo . DoubleBondStereochemistryTest . ... | org . junit . Assert . assertNotNull ( stereo ) |
testBoostingQuery ( ) { com . liferay . portal . search . query . Query positiveQuery = null ; com . liferay . portal . search . query . Query negativeQuery = null ; com . liferay . portal . search . query . BoostingQuery boostingQuery = com . liferay . portal . search . query . test . QueriesInstantiationTest . _queri... | org . junit . Assert . assertNotNull ( boostingQuery ) |
testCurlNull ( ) { "<AssertPlaceHolder>" ; } curl ( java . lang . Object , int [ ] ) { if ( input == null ) { return null ; } if ( ( ! ( input . getClass ( ) . isArray ( ) ) ) || ( input . getClass ( ) . getComponentType ( ) . isArray ( ) ) ) { throw new java . lang . RuntimeException ( "Attempt<sp>to<sp>curl<sp>non-1D... | org . junit . Assert . assertNull ( nom . tam . util . ArrayFuncs . curl ( null , null ) ) |
testGetDefaultIndexPatternWhenConfigDoesNotExist ( ) { givenSearchResultForDocuments ( ".kibana.foo" , new java . util . HashMap ( ) ) ; java . lang . String defaultPattern = utils . getDefaultIndexPattern ( ".kibana.foo" , "test-index-pattern" ) ; "<AssertPlaceHolder>" ; } getDefaultIndexPattern ( java . lang . String... | org . junit . Assert . assertEquals ( "test-index-pattern" , defaultPattern ) |
loadEmptyScenario ( ) { final org . uberfire . backend . vfs . Path scenarioPath = getEmptyScenarioPath ( ) ; final org . drools . workbench . models . testscenarios . shared . Scenario loadedScenario = testEditorService . load ( scenarioPath ) ; "<AssertPlaceHolder>" ; } load ( org . uberfire . backend . vfs . Path ) ... | org . junit . Assert . assertNotNull ( loadedScenario ) |
testRemoteAccess ( ) { final javax . naming . Context context = org . jboss . as . test . shared . integration . ejb . security . Util . createNamingContext ( ) ; org . jboss . as . test . integration . ws . ejb . SimpleStatelessWebserviceEndpointIface ejb3Remote = ( ( org . jboss . as . test . integration . ws . ejb .... | org . junit . Assert . assertEquals ( helloWorld , retObj ) |
testGetFirstMapping ( ) { org . openscience . cdk . interfaces . IAtom atomSource = new org . openscience . cdk . Atom ( "R" ) ; org . openscience . cdk . interfaces . IAtom atomTarget = new org . openscience . cdk . Atom ( "R" ) ; org . openscience . cdk . interfaces . IAtomContainer source = new org . openscience . c... | org . junit . Assert . assertNotNull ( instance . getFirstMapping ( ) ) |
testParameterValue_singletonList ( ) { com . thoughtworks . qdox . model . expression . AnnotationValue value = mock ( com . thoughtworks . qdox . model . expression . AnnotationValue . class ) ; when ( value . getParameterValue ( ) ) . thenReturn ( "2" ) ; com . thoughtworks . qdox . model . expression . AnnotationVal... | org . junit . Assert . assertEquals ( java . util . Collections . singletonList ( "2" ) , expr . getParameterValue ( ) ) |
shouldKillOneHeroAnother ( ) { ( ( com . codenjoy . dojo . spacerace . model . Hero ) ( game3 . getPlayer ( ) . getHero ( ) ) ) . recharge ( ) ; game1 . getJoystick ( ) . up ( ) ; game2 . getJoystick ( ) . up ( ) ; field . tick ( ) ; asrtFl1 ( ( "☼<sp>☼\n" + ( ( ( "☼<sp>☼\n" + "☼<sp>☼\n" ) + "☼☺☻<sp>☼\n" ) + "☼<sp>☻☼\n... | org . junit . Assert . assertTrue ( game2 . isGameOver ( ) ) |
testTranform ( ) { gov . hhs . fha . nhinc . orchestration . Orchestratable message = null ; gov . hhs . fha . nhinc . orchestration . PolicyTransformer . Direction direction = null ; gov . hhs . fha . nhinc . docretrieve . entity . OutboundDocRetrievePolicyTransformer_a0 instance = new gov . hhs . fha . nhinc . docret... | org . junit . Assert . assertEquals ( expResult , result ) |
nearSphereWithMinDistance ( ) { org . springframework . data . geo . Point point = new org . springframework . data . geo . Point ( ( - 73.99171 ) , 40.738868 ) ; java . util . List < org . springframework . data . mongodb . core . Venue > venues = template . find ( query ( where ( "location" ) . nearSphere ( point ) .... | org . junit . Assert . assertThat ( venues . size ( ) , is ( 1 ) ) |
testTransformWithNoFunctions ( ) { java . lang . String sql = "select<sp>*<sp>from<sp>Foo" ; com . liferay . portal . dao . sql . transformer . SQLTransformer sqlTransformer = new com . liferay . portal . dao . sql . transformer . DefaultSQLTransformer ( new java . util . function . Function [ 0 ] ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( sql , sqlTransformer . transform ( sql ) ) |
getAangifteAdreshoudingOkTest ( ) { final java . lang . String code = "A" ; final java . lang . String expedtedLabel = "Ambtshalve" ; final java . lang . String expected = java . lang . String . format ( nl . bzk . migratiebrp . ggo . viewer . service . impl . Lo3StamtabelServiceTest . STRING_FORMAT , code , expedtedLa... | org . junit . Assert . assertEquals ( expected , resultNat ) |
getUniqueUserIdWithUserInSecondaryRealm ( ) { java . lang . String user = "vmmtestuser@SecondaryRealm" ; java . lang . String uniqueUserId = "vmmtestuser@SecondaryRealm" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_Federation_2LDAPs_2RealmsTes... | org . junit . Assert . assertEquals ( uniqueUserId , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_Federation_2LDAPs_2RealmsTest . servlet . getUniqueUserId ( user ) ) |
testSkipCache ( ) { org . tests . model . basic . ResetBasicData . reset ( ) ; io . ebean . Ebean . find ( org . tests . model . basic . Country . class , "NZ" ) ; io . ebean . Query < org . tests . model . basic . Country > query = io . ebean . Ebean . find ( org . tests . model . basic . Country . class ) . setId ( "... | org . junit . Assert . assertThat ( query . getGeneratedSql ( ) ) |
testCheckIfAllLigandsAreDifferent_False ( ) { org . openscience . cdk . geometry . cip . ILigand [ ] sameLigands = new org . openscience . cdk . geometry . cip . ILigand [ ] { org . openscience . cdk . geometry . cip . CIPToolTest . ligands [ 0 ] , org . openscience . cdk . geometry . cip . CIPToolTest . ligands [ 0 ] ... | org . junit . Assert . assertFalse ( org . openscience . cdk . geometry . cip . CIPTool . checkIfAllLigandsAreDifferent ( sameLigands ) ) |
testConstructor ( ) { @ org . openhealthtools . mdht . uml . hl7 . datatypes . operations . SuppressWarnings ( "unused" ) org . openhealthtools . mdht . uml . hl7 . datatypes . operations . EIVL_eventOperations obj = new org . openhealthtools . mdht . uml . hl7 . datatypes . operations . EIVL_eventOperations ( ) ; "<As... | org . junit . Assert . assertTrue ( true ) |
testGetParameters ( ) { java . lang . Long orderTypeId = 1L ; org . lnu . is . domain . order . type . OrderType orderType = new org . lnu . is . domain . order . type . OrderType ( ) ; orderType . setId ( orderTypeId ) ; java . lang . Long employeeId = 2L ; org . lnu . is . domain . employee . Employee employee = new ... | org . junit . Assert . assertEquals ( expected , actual ) |
testDeleteSubnetwork_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . deleteSubnetwork ( com . google . cloud . compute . deprecated . ComputeImplTest . SUBNETWORK_ID . getRegion ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . SUBNETWORK_ID . getSubnetwork ( ) , com . google . clou... | org . junit . Assert . assertNull ( compute . deleteSubnetwork ( com . google . cloud . compute . deprecated . ComputeImplTest . SUBNETWORK_ID ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.