input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testCompilePatternWithTerminatorMark ( ) { java . util . regex . Pattern pat = java . util . regex . Pattern . compile ( "a | org . junit . Assert . assertTrue ( mat . matches ( ) ) |
testSequenceFlowHashCode ( ) { org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow a = new org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow ( ) ; org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow b = new org . kie . workbench . common . stunne... | org . junit . Assert . assertEquals ( a . hashCode ( ) , b . hashCode ( ) ) |
testBuildComponent ( ) { com . xpn . xwiki . objects . BaseObject baseObject = mock ( com . xpn . xwiki . objects . BaseObject . class ) ; com . xpn . xwiki . doc . XWikiDocument parentDocument = mock ( com . xpn . xwiki . doc . XWikiDocument . class ) ; org . xwiki . model . reference . DocumentReference documentRefer... | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
executeKeepAliveTrue ( ) { org . powermock . api . mockito . PowerMockito . when ( httpClientInputs . getKeepAlive ( ) ) . thenReturn ( "true" ) ; java . util . Map < java . lang . String , java . lang . String > result1 = httpClientService . execute ( httpClientInputs ) ; "<AssertPlaceHolder>" ; org . mockito . Mockit... | org . junit . Assert . assertEquals ( result , result1 ) |
reset ( ) { c . setClient ( null ) ; c . reset ( ) ; "<AssertPlaceHolder>" ; } getClient ( ) { return client ; } | org . junit . Assert . assertNotNull ( c . getClient ( ) ) |
shouldConvertMapToStringKeysWithProvidedMap ( ) { final java . util . Map < java . lang . Class < ? extends java . lang . Number > , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( uk . gov . gchq . gaffer . commonutil . Integer . class , "integer" ) ; map . put ( uk . gov . gchq . gaffer . com... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testPostEntitiesWithPrimaryFilter ( ) { org . apache . hadoop . yarn . api . records . timeline . TimelineEntities entities = new org . apache . hadoop . yarn . api . records . timeline . TimelineEntities ( ) ; org . apache . hadoop . yarn . api . records . timeline . TimelineEntity entity = new org . apache . hadoop .... | org . junit . Assert . assertEquals ( 0 , putResposne . getErrors ( ) . size ( ) ) |
pathsAreCopy ( ) { org . openscience . cdk . graph . Cycles cs = org . openscience . cdk . graph . Cycles . all ( makeAnthracene ( ) ) ; int [ ] [ ] org = cs . paths ( ) ; org [ 0 ] [ 0 ] = - 203 ; "<AssertPlaceHolder>" ; } not ( org . openscience . cdk . isomorphism . matchers . IQueryAtom ) { return new org . opensci... | org . junit . Assert . assertThat ( org , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . not ( cs . paths ( ) ) ) ) |
testTooManyColumnsPriority ( ) { try { makeRuleSet ( ) ; makeRuleTable ( ) ; makeRow ( 11 , "C" , "C" , "A" , "PRIORITY" , "P" ) ; listener . finishSheet ( ) ; org . junit . Assert . fail ( "should<sp>have<sp>failed" ) ; } catch ( org . drools . template . parser . DecisionTableParseException e ) { java . lang . String... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( badCell ) ) |
testReadComponentType ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "CalculatorImpl.componentType" ) ; javax . xml . stream . XMLStreamReader reader = org . apache . tuscany . sca . interfacedef . java . xml . ReadTestCase . inputFactory . createXMLStreamReader ( is ) ; org . apache . tuscany ... | org . junit . Assert . assertNotNull ( componentType ) |
testParseNegativeY ( ) { java . lang . String source = ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "4343}" ; org . apache . commons . math3 . geometry . euclidean . twod . Vector2D expected = new org . apache . commons . math3 . geometry . euclidean . twod . Vector2D (... | org . junit . Assert . assertEquals ( expected , actual ) |
testCompareToGreaterThan ( ) { au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel l1 = new au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel ( "name1" , "description1" , java . math . BigInteger . TEN , 2 ) ; au . gov . ga . earthsci . core . temporal . timescale . B... | org . junit . Assert . assertTrue ( ( ( l1 . compareTo ( l2 ) ) > 0 ) ) |
testMatches ( ) { com . fasterxml . jackson . databind . node . BooleanNode booleanNode = jsonNodeFactory . booleanNode ( true ) ; nl . fd . hamcrest . jackson . IsJsonBoolean matcher = new nl . fd . hamcrest . jackson . IsJsonBoolean ( true ) ; boolean matches = matcher . matches ( booleanNode ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( matches ) |
testConvert ( ) { org . opencb . opencga . storage . core . StoragePipelineResult storagePipelineResult = runETL ( variantStorageEngine , smallInputUri , newOutputUri ( ) , new org . opencb . commons . datastore . core . ObjectMap ( VariantStorageEngine . Options . ISOLATE_FILE_FROM_STUDY_CONFIGURATION . key ( ) , true... | org . junit . Assert . assertEquals ( expectedFileMetadata , convertedFileMetadata ) |
createFileSRTestSrAlreadyConfigured ( ) { com . xensource . xenapi . SR srMockRetrievedMethod = org . mockito . Mockito . mock ( com . xensource . xenapi . SR . class ) ; com . xensource . xenapi . SR srMockCreateMethod = org . mockito . Mockito . mock ( com . xensource . xenapi . SR . class ) ; org . mockito . Mockito... | org . junit . Assert . assertEquals ( srMockRetrievedMethod , methodCreateFileSrResult ) |
testGragg ( ) { double tEnd = test ( 2 ) ; "<AssertPlaceHolder>" ; } test ( int ) { double e = 1.0E-15 ; org . apache . commons . math4 . ode . FirstOrderIntegrator integrator = new org . apache . commons . math4 . ode . nonstiff . DormandPrince853Integrator ( e , 100.0 , 1.0E-7 , 1.0E-7 ) ; org . apache . commons . ma... | org . junit . Assert . assertEquals ( 10.0 , tEnd , 1.0E-7 ) |
canModifyProperty ( ) { final org . apache . isis . core . metamodel . consent . Consent visibilityConsent = new org . apache . isis . core . metamodel . consent . Allow ( new org . apache . isis . core . metamodel . consent . InteractionResult ( new org . apache . isis . applib . events . PropertyVisibilityEvent ( emp... | org . junit . Assert . assertThat ( employeeWO . getPassword ( ) , org . hamcrest . CoreMatchers . is ( passwordValue ) ) |
testGetTileMatrixSetNotExists ( ) { org . deegree . tile . TileMatrixSet matrixSet = client . getTileMatrixSet ( "Satellite_PROVO" ) ; "<AssertPlaceHolder>" ; } getTileMatrixSet ( java . lang . String ) { java . util . List < org . deegree . tile . TileMatrixSet > tileMatrixSets = getTileMatrixSets ( ) ; for ( org . de... | org . junit . Assert . assertNull ( matrixSet ) |
testRequestWithInvalidStateQueries ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withStatesQuery ( com . google . common . collect . Sets . newHashSet ( "a1" , "a2... | org . junit . Assert . assertEquals ( expectedRequest , request ) |
testEdges ( ) { java . util . Set edges = com . google . common . collect . Sets . newHashSet ( graph . edges ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( ( ( ( size ) * ( ( size ) - 1 ) ) / 2 ) , edges . size ( ) ) |
valueOf ( ) { "<AssertPlaceHolder>" ; } valueOf ( joptsimple . OptionSpec ) { requireNonNull ( option ) ; java . util . List < V > values = valuesOf ( option ) ; switch ( values . size ( ) ) { case 0 : return null ; case 1 : return values . get ( 0 ) ; default : throw new joptsimple . MultipleArgumentsForOptionExceptio... | org . junit . Assert . assertNull ( empty . valueOf ( "a" ) ) |
testHistoricDecisionInputInstanceBinary ( ) { testRule . deploy ( org . camunda . bpm . engine . test . api . resources . HistoryByteArrayTest . DECISION_PROCESS , org . camunda . bpm . engine . test . api . resources . HistoryByteArrayTest . DECISION_SINGLE_OUTPUT_DMN ) ; startProcessInstanceAndEvaluateDecision ( new ... | org . junit . Assert . assertEquals ( 1 , inputInstances . size ( ) ) |
sourceRunnerTemplateFileTest ( ) { propertyManager . setSourceRunnerTemplateFile ( "myTemplate" ) ; "<AssertPlaceHolder>" ; } getSourceRunnerTemplateFile ( ) { return sourceRunnerTemplateFile ; } | org . junit . Assert . assertThat ( propertyManager . getSourceRunnerTemplateFile ( ) , org . hamcrest . core . Is . is ( "myTemplate" ) ) |
testOnAppLauncherAddEvent ( ) { final java . lang . String appName = "appName" ; final java . lang . String url = "url" ; final java . lang . String css = "fa" ; presenter . onAppLauncherAddEvent ( new org . kie . workbench . common . widgets . client . popups . launcher . events . AppLauncherAddEvent ( appName , url ,... | org . junit . Assert . assertFalse ( presenter . isAppLauncherEmpty ( ) ) |
textRawFullTextTest ( ) { pl . edu . icm . cermine . InputStream testStream = pl . edu . icm . cermine . ContentExtractorTest . class . getResourceAsStream ( pl . edu . icm . cermine . ContentExtractorTest . TEST_PDF_2 ) ; java . lang . String testContent ; try { extractor . setPDF ( testStream ) ; testContent = extrac... | org . junit . Assert . assertEquals ( testContent . trim ( ) , expectedContent . toString ( ) . trim ( ) ) |
trimTest ( ) { org . roaringbitmap . RoaringBitmap rb = new org . roaringbitmap . RoaringBitmap ( ) ; for ( int i = 0 ; i < 4000 ; i ++ ) { rb . add ( ( ( 1 << 16 ) * i ) ) ; } rb . trim ( ) ; int wastedBytes = 0 ; final int javaReferenceSize = 4 ; org . roaringbitmap . RoaringArray ra = rb . highLowContainer ; wastedB... | org . junit . Assert . assertEquals ( 0 , wastedBytes ) |
testCorrelatedSubqueryCaching1 ( ) { java . lang . String sql = "Select<sp>(select<sp>e2<sp>FROM<sp>pm2.g1<sp>WHERE<sp>pm1.g1.e3<sp>=<sp>pm2.g1.e3<sp>limit<sp>1),<sp>(select<sp>e2<sp>FROM<sp>pm2.g1<sp>WHERE<sp>pm1.g1.e3<sp>=<sp>pm2.g1.e3<sp>limit<sp>1)<sp>from<sp>pm1.g1<sp>order<sp>by<sp>e1<sp>limit<sp>1" ; org . teiid... | org . junit . Assert . assertEquals ( 2 , dataManager . getQueries ( ) . size ( ) ) |
colNeValue ( ) { com . foundationdb . sql . optimizer . plan . ConstantExpression value = constant ( "joe" ) ; com . foundationdb . sql . optimizer . plan . ConditionExpression compare = compare ( firstName , Comparison . NE , value ) ; com . foundationdb . sql . optimizer . rule . range . ColumnRanges expected = colum... | org . junit . Assert . assertEquals ( expected , com . foundationdb . sql . optimizer . rule . range . ColumnRanges . rangeAtNode ( compare ) ) |
testGetValueSet ( ) { new mockit . Expectations ( ) { { request . getHeaders ( "h1" ) ; result = java . util . Collections . enumeration ( java . util . Arrays . asList ( "h1v" ) ) ; } } ; org . apache . servicecomb . common . rest . codec . param . HeaderProcessorCreator . HeaderProcessor processor = new org . apache ... | org . junit . Assert . assertThat ( ( ( java . util . Set < java . lang . String > ) ( value ) ) , org . hamcrest . Matchers . contains ( "h1v" ) ) |
testCreate_L1_MSS_reproc ( ) { java . io . File testFile = new java . io . File ( getClass ( ) . getResource ( "test_L1_MSS_MTL.txt" ) . getFile ( ) ) ; org . esa . s3tbx . dataio . landsat . geotiff . LandsatMetadata landsatMetadata = org . esa . s3tbx . dataio . landsat . geotiff . LandsatMetadataFactory . create ( t... | org . junit . Assert . assertTrue ( ( landsatMetadata instanceof org . esa . s3tbx . dataio . landsat . geotiff . LandsatReprocessedMetadata ) ) |
asyncUpgradeSubscription ( ) { when ( service . asyncUpgradeSubscription ( anyString ( ) , anyString ( ) , anyString ( ) , anyListOf ( org . oscm . provisioning . data . ServiceParameter . class ) , anyListOf ( org . oscm . provisioning . data . ServiceAttribute . class ) , any ( org . oscm . provisioning . data . User... | org . junit . Assert . assertEquals ( org . oscm . applicationservice . provisioning . adapter . v1_0 . ProvisioningServiceAdapterV1_0Test . ASYNC , result . getDesc ( ) ) |
testQueryByPkWithEntityNoId ( ) { com . ctrip . platform . dal . dao . shard . ClientTestModel pk = new com . ctrip . platform . dal . dao . shard . ClientTestModel ( ) ; com . ctrip . platform . dal . dao . shard . ClientTestModel model = null ; for ( int i = 0 ; i < ( com . ctrip . platform . dal . dao . shard . Base... | org . junit . Assert . assertNull ( model ) |
testProcessContentLinkWithTitleAsLastParameterDoNotChange ( ) { java . lang . String content = "This<sp>is<sp>a<sp>test<sp><a<sp>href=\"wiki/get_page_attachment?p_l_id=1234" + "&title=ORIGINAL_NAME\"/>" ; content = _wikiPageRenameHTMLContentProcessor . processContent ( 0 , "ORIGINAL_NAME" , "FINAL_NAME" , content ) ; "... | org . junit . Assert . assertEquals ( ( "This<sp>is<sp>a<sp>test<sp><a<sp>href=\"wiki/get_page_attachment?p_l_id=1234" + "&title=ORIGINAL_NAME\"/>" ) , content ) |
shouldDisableCleanUpAtStart ( ) { final java . util . UUID stepMarker = java . util . UUID . randomUUID ( ) ; final org . talend . dataprep . maintenance . preparation . StepMarker marker = new org . talend . dataprep . maintenance . preparation . PreparationStepMarker ( ) ; final org . talend . dataprep . preparation ... | org . junit . Assert . assertEquals ( StepMarker . Result . INTERRUPTED , result ) |
testRemoteHeader ( ) { message . removeHeader ( "content-type" ) ; "<AssertPlaceHolder>" ; } getHeaders ( java . lang . String ) { java . util . List < java . lang . String > result = new java . util . ArrayList < java . lang . String > ( ) ; if ( ( headers ) != null ) { for ( au . com . sensis . stubby . model . StubP... | org . junit . Assert . assertTrue ( message . getHeaders ( "content-type" ) . isEmpty ( ) ) |
testExecuteUserStringListOfStringKnownTargetHasIslandNether ( ) { when ( pm . getUUID ( org . mockito . Mockito . eq ( "tastybento" ) ) ) . thenReturn ( notUUID ) ; when ( im . hasIsland ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( java . util . UUID . class ) ) ) . thenReturn ( true ) ; world ... | org . junit . Assert . assertTrue ( atc . execute ( user , "tpnether" , java . util . Collections . singletonList ( "tastybento" ) ) ) |
providesInstanceByParameter ( ) { org . everrest . core . tools . DependencySupplierImpl dependencySupplier = createDependencySupplier ( "foo" , ( - 1 ) ) ; java . lang . Object instance = dependencySupplier . getInstance ( createParameter ( java . lang . String . class , null , null ) ) ; "<AssertPlaceHolder>" ; } cre... | org . junit . Assert . assertEquals ( "foo" , instance ) |
testVerify ( ) { com . picocontainer . MutablePicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; com . picocontainer . parameters . CollectionComponentParameter parameterNonEmpty = com . picocontainer . parameters . CollectionComponentParameter . ARRAY ; pico . addComponent ( com . picocontainer ... | org . junit . Assert . assertTrue ( ( ( e . getMessage ( ) . indexOf ( com . picocontainer . defaults . CollectionComponentParameterTestCase . Cod . class . getName ( ) ) ) > 0 ) ) |
testCoordinateForPositionOrigin ( ) { setUp ( ) ; builder . scale ( 30 ) ; builder . timestep ( 60 ) ; initGE ( ) ; double [ ] coords = new double [ ] { 0 , 0 } ; int [ ] coordinate = ge . coordinateForPosition ( coords [ 0 ] , coords [ 1 ] ) ; "<AssertPlaceHolder>" ; } coordinateForPosition ( double , double ) { doubl... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new int [ ] { 0 , 0 } , coordinate ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . UserIdMapper . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjectio... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
hasNoParts ( ) { "<AssertPlaceHolder>" ; } getParts ( ) { return emptyList ( ) ; } | org . junit . Assert . assertThat ( entity . getParts ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . empty ( ) ) ) |
returnsTenUnitsWithinPlayableMapBoundaries ( ) { java . util . Set < com . fundynamic . d2tm . game . entities . Entity > result = entitiesSet . filter ( com . fundynamic . d2tm . game . entities . Predicate . builder ( ) . isWithinPlayableMapBoundaries ( map ) ) ; "<AssertPlaceHolder>" ; } isWithinPlayableMapBoundarie... | org . junit . Assert . assertEquals ( 10 , result . size ( ) ) |
testReplicationStartTimeout ( ) { server1 = createServer ( "infinispan-replicated-config.xml" , "tcp-shared.xml" ) ; server2 = createServer ( "infinispan-replicated-config-1.xml" , "tcp-shared.xml" ) ; deployMatViewVDB ( server1 ) ; java . sql . Connection c1 = server1 . createConnection ( "jdbc:teiid:matviews" ) ; jav... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
listCommand ( ) { java . lang . String listOutput = executeCommand ( "bundle:list<sp>-t<sp>0" , org . apache . karaf . itests . BundleTest . ADMIN_ROLES ) ; System . out . println ( listOutput ) ; "<AssertPlaceHolder>" ; } executeCommand ( java . lang . String , java . security . Principal [ ] ) { return executeCommand... | org . junit . Assert . assertFalse ( listOutput . isEmpty ( ) ) |
testIFWithIndentAndExprWithIndentOnMultipleLines ( ) { org . stringtemplate . v4 . ST t = new org . stringtemplate . v4 . ST ( ( ( ( ( ( ( ( ( ( ( ( ( ( "begin" + ( newline ) ) + "<sp><if(x)>" ) + ( newline ) ) + "<sp><x>" ) + ( newline ) ) + "<sp><else>" ) + ( newline ) ) + "<sp><y>" ) + ( newline ) ) + "<sp><endif>" ... | org . junit . Assert . assertEquals ( expecting , result ) |
testSelecterenIdsVanOpTeSchonenProcessen ( ) { final java . util . List < java . lang . Long > processenLijst = new java . util . ArrayList ( ) ; processenLijst . add ( ( ( long ) ( 1 ) ) ) ; org . mockito . Mockito . when ( extractieDao . haalProcesIdsOpBasisVanBeeindigdeProcesExtractiesOp ( nl . bzk . migratiebrp . i... | org . junit . Assert . assertEquals ( processenLijst , result ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange context = new org . lnu . is . domain . mark . scale . exchange . MarkScaleExchange ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>MarkScaleExchange<sp>e<sp>WHERE... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testResolveFullyQualifiedName ( ) { typeResolver = com . thoughtworks . qdox . type . TypeResolver . byPackageName ( null , classLibrary , java . util . Collections . < java . lang . String > emptyList ( ) ) ; when ( classLibrary . hasClassReference ( "open.Bar" ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } res... | org . junit . Assert . assertEquals ( "open.Bar" , typeResolver . resolveType ( "open.Bar" ) ) |
groupByEach ( ) { org . eclipse . collections . api . multimap . MutableMultimap < java . lang . Integer , java . lang . Integer > expected = org . eclipse . collections . impl . multimap . list . FastListMultimap . newMultimap ( ) ; for ( int i = 1 ; i < 8 ; i ++ ) { expected . putAll ( ( - i ) , org . eclipse . colle... | org . junit . Assert . assertEquals ( expected , actual ) |
testNestedPackage ( ) { org . eclipse . emf . ecore . resource . Resource ecoreResource = new org . eclipse . emf . ecore . xmi . impl . XMIResourceImpl ( ) ; org . eclipse . emf . ecore . resource . Resource genmodelResource = new org . eclipse . emf . ecore . xmi . impl . XMIResourceImpl ( ) ; org . eclipse . emf . e... | org . junit . Assert . assertEquals ( 3 , index . size ( ) ) |
whenRequestingNeighborhoodOfTargetJob_sizeShouldBe4 ( ) { com . graphhopper . jsprit . core . algorithm . ruin . JobNeighborhoodsOptimized jn = new com . graphhopper . jsprit . core . algorithm . ruin . JobNeighborhoodsOptimized ( vrp , jobDistance , 4 ) ; jn . initialise ( ) ; java . util . Iterator < com . graphhoppe... | org . junit . Assert . assertEquals ( 4 , services . size ( ) ) |
testEmptyConfig ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . set ( "TestRange" , "" ) ; java . net . ServerSocket socket = new java . net . ServerSocket ( ) ; java . net . InetSocketAddress address = new java . net . InetSocketAddress ( "0.0.0.0... | org . junit . Assert . assertTrue ( socket . isBound ( ) ) |
joinWithEmptyList ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "" , instance . join ( ) ) |
testSerializationWithQuery ( ) { javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; java . lang . Object oid = null ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . test . api . TestSerializer ts1 = new org . zoodb . test . api . TestSerializer ( ) ; ts1 . init ( ) ;... | org . junit . Assert . assertTrue ( qr . iterator ( ) . hasNext ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . tools . service . builder . test . model . LVEntry . class , _dynamicQueryClassLoader ) ; dynami... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testLength ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='lengthField']//xs:length/@value<sp>=<sp>2" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
stickiness_resolveTwice_metadataKeyUnChanged ( ) { java . util . Map < java . lang . String , java . lang . String > serviceConfig1 = new java . util . HashMap ( ) ; serviceConfig1 . put ( "stickinessMetadataKey" , "my-sticky-key1" ) ; io . grpc . Attributes attributes1 = io . grpc . Attributes . newBuilder ( ) . set (... | org . junit . Assert . assertSame ( stickinessMap1 , stickinessMap2 ) |
testLicenseExpirationEventNoExpirationDate ( ) { com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManagerTest . MockCallHomeEventManager manager = new com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManagerTest . MockCallHomeEventManager (... | org . junit . Assert . assertTrue ( manager . doSendLicenseExpiration ( licenseInfo ) ) |
testGetJobStatusReadOnlyComplete ( ) { when ( mockAuthorizationManager . isUserCreatorOrAdmin ( any ( org . sagebionetworks . repo . model . UserInfo . class ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( mockStackStatusDao . getCurrentStatus ( ) ) . thenReturn ( StatusEnum . READ_ONLY ) ; org . sagebionetworks .... | org . junit . Assert . assertNotNull ( result ) |
testVerifyPassword_Empty ( ) { final int salt = 123456 ; final byte [ ] hash = org . oscm . authorization . PasswordHash . calculateHash ( salt , "<sp>" ) ; "<AssertPlaceHolder>" ; } verifyPassword ( long , byte [ ] , java . lang . String ) { return java . util . Arrays . equals ( org . oscm . authorization . PasswordH... | org . junit . Assert . assertTrue ( org . oscm . authorization . PasswordHash . verifyPassword ( salt , hash , "<sp>" ) ) |
testGetSecond ( ) { final com . annimon . stream . IntPair < java . lang . String > p = new com . annimon . stream . IntPair < java . lang . String > ( 1 , "first" ) ; "<AssertPlaceHolder>" ; } getSecond ( ) { return second ; } | org . junit . Assert . assertEquals ( "first" , p . getSecond ( ) ) |
test_getBundleSymbolicName_noMainAttr ( ) { java . util . jar . Manifest manifest = org . mockito . Mockito . mock ( java . util . jar . Manifest . class ) ; java . lang . String bundleSymbolicName = org . talend . commons . utils . resource . BundleFileUtil . getBundleSymbolicName ( manifest ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertNull ( bundleSymbolicName ) |
createKeyStoreTest ( ) { org . arquillian . spacelift . Spacelift . task ( keyStoreToCreate , org . arquillian . droidium . container . task . CreateKeyStoreTask . class ) . sdk ( androidSDK ) . execute ( ) . await ( ) ; "<AssertPlaceHolder>" ; } sdk ( org . arquillian . droidium . container . configuration . AndroidSD... | org . junit . Assert . assertTrue ( keyStoreToCreate . exists ( ) ) |
getStart ( ) { net . time4j . PlainTimestamp start = net . time4j . PlainTimestamp . of ( 2014 , 2 , 27 , 0 , 0 ) ; net . time4j . PlainTimestamp end = net . time4j . PlainTimestamp . of ( 2014 , 5 , 14 , 0 , 0 ) ; "<AssertPlaceHolder>" ; } between ( net . time4j . PlainTimestamp , net . time4j . PlainTimestamp ) { ret... | org . junit . Assert . assertThat ( net . time4j . range . TimestampInterval . between ( start , end ) . getStart ( ) , org . hamcrest . CoreMatchers . is ( net . time4j . range . Boundary . of ( IntervalEdge . CLOSED , start ) ) ) |
testApplySchemaChangeOverLimit ( ) { java . lang . String viewId = "syn123" ; org . sagebionetworks . repo . model . table . ColumnChange change = new org . sagebionetworks . repo . model . table . ColumnChange ( ) ; change . setOldColumnId ( null ) ; change . setNewColumnId ( "456" ) ; java . util . List < org . sageb... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( ( "" + ( TableViewManagerImpl . MAX_COLUMNS_PER_VIEW ) ) ) ) |
testMachineIsRunning_noSimulation_notRunning ( ) { org . mockito . Mockito . when ( this . standardAgentFactory . getInstancesNames ( ) ) . thenReturn ( new java . util . ArrayList < java . lang . String > ( 0 ) ) ; org . mockito . Mockito . when ( this . nazgulAgentFactory . getInstancesNames ( ) ) . thenReturn ( new ... | org . junit . Assert . assertFalse ( this . handler . isMachineRunning ( parameters , machineId ) ) |
testCanSetupLimitedValueWhenOperatorNeedsAValue ( ) { when ( plugin . editingCol ( ) ) . thenReturn ( new org . drools . workbench . models . guided . dtable . shared . model . LimitedEntryConditionCol52 ( ) ) ; when ( plugin . doesOperatorNeedValue ( ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } canSetupLimit... | org . junit . Assert . assertFalse ( page . canSetupLimitedValue ( ) ) |
whenReadingShipments_itReadsThemCorrectly ( ) { com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . Builder builder = VehicleRoutingProblem . Builder . newInstance ( ) ; new com . graphhopper . jsprit . io . problem . VrpXMLReader ( builder , null ) . read ( inputStream ) ; com . graphhopper . jsprit ... | org . junit . Assert . assertEquals ( 2 , shipCounter ) |
convertRedirectServerSyncTest ( ) { org . kaaproject . kaa . server . sync . platform . AvroEncDec avroEncDec = new org . kaaproject . kaa . server . sync . platform . AvroEncDec ( ) ; java . lang . reflect . Method method = org . kaaproject . kaa . server . sync . platform . AvroEncDec . class . getDeclaredMethod ( or... | org . junit . Assert . assertNull ( method . invoke ( avroEncDec , serverSync ) ) |
testGetSum ( ) { com . javapractice . leetcode . SumOfTwoIntegers test = new com . javapractice . leetcode . SumOfTwoIntegers ( ) ; "<AssertPlaceHolder>" ; } getSum ( int , int ) { if ( ( start < 0 ) || ( end > ( ( length ) - 1 ) ) ) { throw new java . lang . RuntimeException ( "Invalid<sp>Input" ) ; } return getSumUti... | org . junit . Assert . assertEquals ( test . getSum ( 1 , 2 ) , 3 ) |
testGatherSimple ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiff = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1 , 2 , 3 , 4 } , new long [ ] { 2 , 2 } ) ; org . nd4j . autodiff... | org . junit . Assert . assertEquals ( expected , result . eval ( ) ) |
readBytes_onClosedStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new org . e... | org . junit . Assert . assertArrayEquals ( subArray ( testData , 2 ) , result ) |
quote ( ) { hudson . model . Label l = j . jenkins . getLabel ( "\"abc\\\\\\\"def\"" ) ; org . junit . Assert . assertEquals ( "abc\\\"def" , l . getName ( ) ) ; l = j . jenkins . getLabel ( "label1||label2" ) ; l = j . jenkins . getLabel ( "\"label1||label2\"" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return null ; ... | org . junit . Assert . assertEquals ( "label1||label2" , l . getName ( ) ) |
toPrimitiveBooleanForEmptyString ( ) { "<AssertPlaceHolder>" ; } toPrimitiveBoolean ( java . lang . Object ) { java . lang . Boolean b = org . slim3 . util . BooleanUtil . toBoolean ( o ) ; if ( b != null ) { return b . booleanValue ( ) ; } return false ; } | org . junit . Assert . assertThat ( org . slim3 . util . BooleanUtil . toPrimitiveBoolean ( "" ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testRollback ( ) { final java . util . concurrent . atomic . AtomicInteger i = new java . util . concurrent . atomic . AtomicInteger ( 1 ) ; ch . maxant . generic_jca_adapter . MicroserviceXAResource xa = new ch . maxant . generic_jca_adapter . MicroserviceXAResource ( "a" , new ch . maxant . generic_jca_adapter . Comm... | org . junit . Assert . assertEquals ( 2 , i . get ( ) ) |
testPluginPDF ( ) { request . setPluginPDF ( true ) ; "<AssertPlaceHolder>" ; } getPluginPDF ( ) { return getBooleanParameter ( org . piwik . java . tracking . PiwikRequest . PLUGIN_PDF ) ; } | org . junit . Assert . assertEquals ( true , request . getPluginPDF ( ) ) |
encodeBase64MultipleOf4Minus2CharactersSuccess ( ) { java . lang . String textToEncode = "This<sp>is<sp>a<sp>valid<sp>test<sp>(aBcDeFgHiJKLmnoPqRstuVWXyz)-01234567" ; java . lang . String expectedBase64Result = "VGhpcyBpcyBhIHZhbGlkIHRlc3QgKGFCY0RlRmdIaUpLTG1ub1BxUnN0dVZXWHl6KS0wMTIzNDU2Nw==" ; byte [ ] result = com . ... | org . junit . Assert . assertEquals ( expectedBase64Result , new java . lang . String ( result ) ) |
testGetSubDataTypeStack ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String uuid = "uuid" ; when ( typeStack . get ( uuid ) ) . thenRet... | org . junit . Assert . assertEquals ( expectedTypeStack , actualTypeStack ) |
testEqualsWithDifferentValue ( ) { java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; attributes . put ( "att123" , "val123" ) ; java . util . Map < java . lang . String , java . lang . String > attributes2 = new... | org . junit . Assert . assertFalse ( port . equals ( port2 ) ) |
getMd5FromBytesTest ( ) { java . io . File file = new java . io . File ( "F:\\Blizzard\\World<sp>of<sp>Warcraft\\Wow-64.exe" ) ; byte [ ] byteArray = this . getByteArrayFromFile ( file ) ; java . lang . String fileMD5 = com . jhonelee . jfdf . image . utils . MD5Utils . getMd5FromBytes ( byteArray ) ; "<AssertPlaceHold... | org . junit . Assert . assertNotNull ( fileMD5 ) |
roundSeconds1 ( ) { org . diirt . graphene . TimeScales . TimePeriod period = org . diirt . graphene . TimeScales . toTimePeriod ( 30.0 ) ; "<AssertPlaceHolder>" ; } toTimePeriod ( double ) { if ( seconds >= 36288000 ) { return new org . diirt . graphene . TimeScales . TimePeriod ( java . util . GregorianCalendar . YEA... | org . junit . Assert . assertThat ( period , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 30.0 ) ) ) |
testRemove ( ) { java . lang . String newConfig = ( ( java . lang . String ) ( run ( "PARSER_STELLAR_TRANSFORM_ADD(config,<sp>SHELL_VARS2MAP('upper'))" , com . google . common . collect . ImmutableMap . of ( "config" , emptyTransformationsConfig ) , context ) ) ) ; newConfig = ( ( java . lang . String ) ( run ( "PARSER... | org . junit . Assert . assertEquals ( 0 , transformations . size ( ) ) |
testGetAllSubscriptionActionsForOrganizationBySubId ( ) { container . login ( userKey3 , org . oscm . triggerservice . bean . ROLE_ORGANIZATION_ADMIN ) ; java . util . List < org . oscm . triggerservice . bean . VOTriggerProcess > list = triggerServiceLocal . getAllActionsForSubscription ( "subId" ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
getAccountsTest ( ) { java . util . List < com . docdoku . api . models . AccountDTO > accounts = new com . docdoku . api . services . AdminApi ( TestConfig . ROOT_CLIENT ) . getAccounts ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( accounts . isEmpty ( ) ) |
whenHasNextThenResultTrue ( ) { vkaretko . MyArrayList list = new vkaretko . MyArrayList ( ) ; list . add ( 0 ) ; java . util . Iterator itr = list . iterator ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( cursor ) != ( size ) ; } | org . junit . Assert . assertThat ( itr . hasNext ( ) , org . hamcrest . core . Is . is ( true ) ) |
testReturnsAnExactMatchWithSpecifiedVersion ( ) { org . json . JSONObject jsonSource = new org . json . JSONObject ( ) ; jsonSource . put ( "aut" , "io.selendroid.test:0.11.0" ) ; io . selendroid . common . SelendroidCapabilities capa = new io . selendroid . common . SelendroidCapabilities ( jsonSource ) ; java . lang ... | org . junit . Assert . assertEquals ( "io.selendroid.test:0.11.0" , defaultApp ) |
relayoutPropertySetLeadsToInvalidation ( ) { jetbrains . jetpad . projectional . view . View view = newView ( ) ; view . validate ( ) ; view . set ( new jetbrains . jetpad . projectional . view . ViewPropertySpec ( "a" , ViewPropertyKind . RELAYOUT ) , new java . lang . Object ( ) ) ; "<AssertPlaceHolder>" ; } valid ( ... | org . junit . Assert . assertFalse ( view . valid ( ) . get ( ) ) |
createLinkedList_varArgs_withNull ( ) { java . util . List < java . lang . Integer > list = createLinkedList ( ( ( java . lang . Integer [ ] ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } createLinkedList ( java . lang . Iterable ) { java . util . LinkedList < T > list = new java . util . LinkedList < T > ( ) ; com . aliba... | org . junit . Assert . assertTrue ( ( list instanceof java . util . LinkedList < ? > ) ) |
testCreate ( ) { org . oscarehr . common . model . RemoteReferral entity = new org . oscarehr . common . model . RemoteReferral ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testRetries ( ) { com . vladmihalcea . mongo . model . Product product = new com . vladmihalcea . mongo . model . Product ( ) ; product . setId ( 123L ) ; product . setName ( "Tv" ) ; productRepository . save ( product ) ; com . vladmihalcea . mongo . model . Product savedProduct = productRepository . findOne ( 123L ) ... | org . junit . Assert . assertEquals ( savedProduct , product ) |
testTautology ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass (... | org . junit . Assert . assertEquals ( 3 , list . size ( ) ) |
testNotDocIdSet ( ) { System . out . println ( "" ) ; System . out . println ( "Running<sp>NotDocIdSet<sp>test" ) ; System . out . println ( "----------------------------" ) ; int max = 1000 ; if ( ( _max ) > 1000 ) max = ( _max ) / 1000 ; int length = 100 ; if ( ( _length ) > 100 ) length = ( _length ) / 100 ; java . ... | org . junit . Assert . assertFalse ( intSet . contains ( docid ) ) |
testListMessageCounterAsHTML ( ) { org . apache . activemq . artemis . api . core . SimpleString address = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; org . apache . activemq . artemis . api . core . SimpleString queue = org . apache . activemq . artemis . utils . RandomUtil . rand... | org . junit . Assert . assertNotNull ( history ) |
testAdditionalFeatures ( ) { org . apache . uima . collection . CollectionReader ner = createReader ( de . tudarmstadt . ukp . dkpro . core . io . negra . NegraExportReader . class , NegraExportReader . PARAM_SOURCE_LOCATION , "src/test/resources/tuebadz/corpus-sample.export" , NegraExportReader . PARAM_LANGUAGE , "de"... | org . junit . Assert . assertEquals ( reference , actual ) |
forkNodeIncomingsOutgoingsMustBeControlFlows ( ) { org . eclipse . uml2 . uml . ForkNode node = UMLFactory . eINSTANCE . createForkNode ( ) ; org . eclipse . uml2 . uml . ObjectFlow inFlow = UMLFactory . eINSTANCE . createObjectFlow ( ) ; node . getIncomings ( ) . add ( inFlow ) ; "<AssertPlaceHolder>" ; } isValidContr... | org . junit . Assert . assertFalse ( services . isValidControlFlowStart ( node ) ) |
testSetFieldValue ( ) { final java . lang . reflect . Field someField = ru . yandex . qatools . camelot . util . ServiceUtilTest . SomeClass . class . getDeclaredField ( "someField" ) ; ru . yandex . qatools . camelot . util . ServiceUtil . setFieldValue ( someField , someObject , "test" ) ; ru . yandex . qatools . cam... | org . junit . Assert . assertEquals ( someObject . someField , "test" ) |
testCreateColumnNameHeaderWithRowId ( ) { java . util . List < org . sagebionetworks . repo . model . table . SelectColumn > schema = com . google . common . collect . Lists . newArrayList ( ) ; schema . add ( org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createSelectColumn ( 123L , "... | org . junit . Assert . assertEquals ( java . util . Arrays . toString ( expected ) , java . util . Arrays . toString ( results ) ) |
togglesCheckboxButton ( ) { org . eclipse . swtbot . swt . finder . widgets . SWTBotToolbarToggleButton button = bot . toolbarToggleButton ( "Check" ) ; boolean checked = button . isChecked ( ) ; button . toggle ( ) ; "<AssertPlaceHolder>" ; } isChecked ( ) { return syncExec ( new org . eclipse . swtbot . swt . finder ... | org . junit . Assert . assertTrue ( ( checked != ( button . isChecked ( ) ) ) ) |
testDataStoreNameIsSet ( ) { final org . jbpm . workbench . common . client . list . ListTable < T > currentListGrid = org . jbpm . workbench . common . client . list . AbstractMultiGridViewTest . spy ( new org . jbpm . workbench . common . client . list . ListTable < T > ( new org . uberfire . ext . services . shared ... | org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) ) |
testRemainingCapacity ( ) { "<AssertPlaceHolder>" ; } remainingCapacity ( ) { return Integer . MAX_VALUE ; } | org . junit . Assert . assertEquals ( Integer . MAX_VALUE , list . remainingCapacity ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.