input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testListOrders_Cancelled ( ) { try { java . lang . String filter = getTestRunMessageValue ( "cancelledOrdersFilter" ) ; upsertOnTestRunMessage ( "filter" , filter ) ; java . util . List < org . mule . module . magento . automation . testcases . SalesOrderListEntity > orders = runFlowAndGetPayload ( "list-orders" ) ; "<... | org . junit . Assert . assertTrue ( orders . isEmpty ( ) ) |
testEmptyArray ( ) { com . aliyun . odps . mapred . conf . JobConf conf = new com . aliyun . odps . mapred . conf . JobConf ( ) ; conf . setOutputKeySortColumns ( new java . lang . String [ 0 ] ) ; "<AssertPlaceHolder>" ; } getOutputKeySortColumns ( ) { java . lang . String joined = get ( CONF . OUTPUT_KEY_SORT_COLUMNS... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ 0 ] , conf . getOutputKeySortColumns ( ) ) |
get_partitions_by_expr ( ) { org . apache . hadoop . hive . metastore . api . PartitionsByExprRequest req = new org . apache . hadoop . hive . metastore . api . PartitionsByExprRequest ( ) ; req . setDbName ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ; org . apache . hadoop . hive . m... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( outbound ) ) |
testCheckListPathValid ( ) { org . provebit . merkle . FileMerkle mtree = new org . provebit . merkle . FileMerkle ( HashType . SHA256 ) ; mtree . addTracking ( org . provebit . merkle . FileMerkleTest . completeDirPath , false ) ; mtree . makeTree ( ) ; byte [ ] [ ] tree = mtree . getTree ( ) ; byte [ ] startingHash =... | org . junit . Assert . assertTrue ( mtree . checkPath ( path ) ) |
testThatTagNodeIsNotTerseIfTempalteSettingIsNotTerse ( ) { template . setMode ( Jade4J . Mode . XHTML ) ; for ( int i = 0 ; i < ( selfClosing . length ) ; i ++ ) { tagNode . setName ( selfClosing [ i ] ) ; "<AssertPlaceHolder>" ; } } isTerse ( de . neuland . jade4j . template . JadeTemplate ) { return ( isSelfClosing (... | org . junit . Assert . assertFalse ( tagNode . isTerse ( template ) ) |
testComputeJTSPeerWithGeometry ( ) { com . vividsolutions . jts . geom . GeometryFactory fac = new com . vividsolutions . jts . geom . GeometryFactory ( ) ; com . vividsolutions . jts . geom . Geometry toWrap = fac . createPoint ( new com . vividsolutions . jts . geom . Coordinate ( 0 , 0 ) ) ; toTest = new ddf . catal... | org . junit . Assert . assertEquals ( toWrap , toTest . computeJTSPeer ( ) ) |
getArrayFormulaRange_returnsNull ( ) { org . apache . poi . ss . usermodel . Cell cell = new org . apache . poi . xssf . streaming . SXSSFCell ( null , org . apache . poi . ss . usermodel . CellType . BLANK ) ; org . apache . poi . ss . util . CellRangeAddress result = cell . getArrayFormulaRange ( ) ; "<AssertPlaceHol... | org . junit . Assert . assertNull ( result ) |
deveObterCodigoStatusComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . NFInfoEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe400 . classes . evento . NFInfoEventoRetorno ( ) ; final int codigoStatus = 100 ; eventoRetorno . setCodigoStatus ( codigoStatus ) ;... | org . junit . Assert . assertEquals ( codigoStatus , eventoRetorno . getCodigoStatus ( ) , 0 ) |
testGetDescriptionWithZero ( ) { final java . lang . String string = org . apache . commons . imaging . formats . psd . ImageResourceType . getDescription ( 0 ) ; "<AssertPlaceHolder>" ; } getDescription ( int ) { for ( final org . apache . commons . imaging . formats . psd . ImageResourceType type : org . apache . com... | org . junit . Assert . assertEquals ( "Unknown" , string ) |
addToEmptyDocumentTest ( ) { org . apache . cxf . ws . transfer . manager . ResourceManager resourceManager = new org . apache . cxf . ws . transfer . manager . MemoryResourceManager ( ) ; org . apache . cxf . ws . addressing . ReferenceParametersType refParams = resourceManager . create ( new org . apache . cxf . ws .... | org . junit . Assert . assertEquals ( "a" , rootEl . getNodeName ( ) ) |
testEndedLineVar ( ) { org . pentaho . di . trans . steps . textfileoutput . TextFileOutputData data = new org . pentaho . di . trans . steps . textfileoutput . TextFileOutputData ( ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; data . writer = baos ; org . pentaho . di . trans... | org . junit . Assert . assertEquals ( "this<sp>is<sp>the<sp>end" , baos . toString ( "UTF-8" ) ) |
testIsEmpty ( ) { "<AssertPlaceHolder>" ; } emptyBag ( ) { return ( ( org . kocakosm . pitaya . collection . Bag < E > ) ( org . kocakosm . pitaya . collection . Bags . EMPTY_BAG ) ) ; } | org . junit . Assert . assertTrue ( org . kocakosm . pitaya . collection . Bags . emptyBag ( ) . isEmpty ( ) ) |
deleteAllRatingsInComponentInstance ( ) { org . silverpeas . core . persistence . Transaction . performInOne ( ( ) -> { repository . deleteAllRatingsInComponentInstance ( "kmelia12" ) ; return null ; } ) ; java . util . List < org . silverpeas . core . contribution . rating . model . Rating > ratings = org . silverpeas... | org . junit . Assert . assertThat ( ratings . isEmpty ( ) , org . hamcrest . Matchers . is ( true ) ) |
getTopicsPendingModerationForumIsNotModeratedShouldReturnEmptyList ( ) { net . jforum . entities . Forum forum = new net . jforum . entities . Forum ( ) ; forum . setModerated ( false ) ; "<AssertPlaceHolder>" ; } getTopicsPendingModeration ( ) { final net . jforum . entities . Forum forum = new net . jforum . entities... | org . junit . Assert . assertEquals ( 0 , forum . getTopicsPendingModeration ( ) . size ( ) ) |
testNoError ( ) { com . streamsets . pipeline . lib . remote . RemoteConnector connector = getConnector ( getBean ( ( ( ( ( getScheme ( ) ) + "://localhost:" ) + ( port ) ) + "/" ) , true , false , com . streamsets . pipeline . lib . remote . TESTUSER , com . streamsets . pipeline . lib . remote . TESTPASS , null , nul... | org . junit . Assert . assertEquals ( 0 , issues . size ( ) ) |
testUnwrappedWithAny ( ) { final com . fasterxml . jackson . dataformat . xml . XmlMapper mapper = new com . fasterxml . jackson . dataformat . xml . XmlMapper ( ) ; final java . lang . String xml = "<xml>\n" + ( ( ( ( ( ( "<type>type</type>\n" + "<x>10</x>\n" ) + "<y>10</y>\n" ) + "<k1>k1</k1>\n" ) + "<k2>k1</k2>\n" )... | org . junit . Assert . assertNotNull ( value ) |
shouldRaiseConstraintViolationCausePriceLow ( ) { org . agoncal . book . javaee7 . chapter03 . ex01 . Book01 book = new org . agoncal . book . javaee7 . chapter03 . ex01 . Book01 ( "H2G2" , 0.5F , "Best<sp>IT<sp>Scifi<sp>Book" , "1234-4566-9876" , 247 , false ) ; java . util . Set < javax . validation . ConstraintViola... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testVDBRespositoryGetActive ( ) { org . teiid . deployers . VDBRepository repo = new org . teiid . deployers . VDBRepository ( ) ; org . teiid . deployers . CompositeVDB mock1 = org . mockito . Mockito . mock ( org . teiid . deployers . CompositeVDB . class ) ; org . teiid . adminapi . impl . VDBMetaData vdb = new org ... | org . junit . Assert . assertEquals ( "2" , live . getVersion ( ) ) |
testDefaultNullValues ( ) { java . lang . Integer value = ofInteger ( ) . get ( Config . EMPTY , null ) ; "<AssertPlaceHolder>" ; } get ( io . datakernel . config . Config , io . datakernel . config . ConfigsModuleTest$TestClass ) { io . datakernel . config . ConfigsModuleTest . TestClass testClass = new io . datakerne... | org . junit . Assert . assertNull ( value ) |
testGenericMethodFromReturnValue ( ) { java . lang . Class < ? > targetClass = com . examples . with . different . packagename . generic . GenericMethodWithBounds . class ; java . lang . reflect . Method targetMethod = targetClass . getMethod ( "is" , new java . lang . Class < ? > [ ] { org . evosuite . utils . Compara... | org . junit . Assert . assertEquals ( instantiatedMethod . getGeneratedClass ( ) , generatedType ) |
testGetLength ( ) { mockHelper . replayAll ( ) ; classUnderTest . setEndPosition ( 10 ) ; "<AssertPlaceHolder>" ; mockHelper . verifyAll ( ) ; } getLength ( ) { return ( ( endPosition ) - ( startPosition ) ) + 1 ; } | org . junit . Assert . assertEquals ( 12 , classUnderTest . getLength ( ) ) |
compareToLesserValue ( ) { final java . nio . file . Path path = fileSystem . getPath ( "/toplevel/b" ) ; final java . lang . String otherName = "/toplevel/a" ; final java . nio . file . Path other = fileSystem . getPath ( otherName ) ; final int compare = path . compareTo ( other ) ; "<AssertPlaceHolder>" ; } compareT... | org . junit . Assert . assertEquals ( 1 , compare ) |
loadBlobAndSave_theResultBlobIdShouldBeTheSame ( ) { org . eclipse . jgit . lib . ObjectId loaded = writeSomethingToCache ( ) ; org . eclipse . jgit . lib . ObjectId saved = com . beijunyi . parallelgit . utils . io . BlobSnapshot . load ( loaded , repo ) . save ( repo ) ; "<AssertPlaceHolder>" ; } save ( com . beijuny... | org . junit . Assert . assertEquals ( loaded , saved ) |
testSimpleWithDecimalsTrunc ( ) { org . apache . commons . math4 . geometry . euclidean . twod . Cartesian2D c = new org . apache . commons . math4 . geometry . euclidean . twod . Cartesian2D ( 1.232323232323 , 1.434343434343 ) ; java . lang . String expected = ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323232323;<... | org . junit . Assert . assertEquals ( expected , actual ) |
testOwnerQuery ( ) { org . nuxeo . ecm . automation . OperationContext ctx = new org . nuxeo . ecm . automation . OperationContext ( session ) ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; params . put ( "quer... | org . junit . Assert . assertTrue ( ( ( entries . size ( ) ) > 0 ) ) |
testLowest ( ) { org . bukkit . Note note = new org . bukkit . Note ( 0 , Note . Tone . F , true ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertEquals ( note . getId ( ) , ( ( byte ) ( 0 ) ) ) |
appliesCredentialsIfConfigured ( ) { org . appenders . log4j2 . elasticsearch . Credentials < org . elasticsearch . common . settings . Settings . Builder > credentials = org . mockito . Mockito . mock ( org . appenders . log4j2 . elasticsearch . Credentials . class ) ; org . elasticsearch . common . settings . Setting... | org . junit . Assert . assertEquals ( settingsBuilder , builderArgumentCaptor . getValue ( ) ) |
testSendMessageOnResume ( ) { org . apache . cxf . transport . jms . continuations . Counter continuations = new org . apache . cxf . transport . jms . continuations . JMSContinuationTest . DummyCounter ( ) ; org . apache . cxf . transport . jms . continuations . JMSContinuation cw = new org . apache . cxf . transport ... | org . junit . Assert . assertFalse ( cw . suspend ( 1000 ) ) |
testRepeatedRuleLabelInLexer ( ) { java . lang . String grammar = "lexer<sp>grammar<sp>T;\n" + ( "B<sp>:<sp>x=A<sp>x=A<sp>;\n" + "fragment<sp>A<sp>:<sp>\'a\'<sp>;\n" ) ; boolean found = rawGenerateAndBuildRecognizer ( "T.g" , grammar , null , "T" , false ) ; boolean expecting = true ; "<AssertPlaceHolder>" ; } rawGener... | org . junit . Assert . assertEquals ( expecting , found ) |
testBuildColumnInfoList_ContainingNulls ( ) { java . util . List < org . apache . phoenix . util . ColumnInfo > columnInfoListWithNull = com . google . common . collect . Lists . newArrayList ( new org . apache . phoenix . util . ColumnInfo ( "idCol" , PInteger . INSTANCE . getSqlType ( ) ) , null , new org . apache . ... | org . junit . Assert . assertEquals ( columnInfoListWithNull , fromConfig ) |
test_convertNumberToRomanNumeral ( ) { java . lang . String five = com . levelup . java . exercises . beginner . RomanNumerals . convertNumberToRomanNumeral ( 5 ) ; "<AssertPlaceHolder>" ; } convertNumberToRomanNumeral ( java . lang . Integer ) { switch ( number ) { case 1 : return "I" ; case 2 : return "II" ; case 3 :... | org . junit . Assert . assertEquals ( "V" , five ) |
shouldReturnNotEqualForDifferentBaseObjectId3 ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelBlob left = createGitModelBlob ( zeroId ( ) , org . eclipse . jgit . lib . ObjectId . zeroId ( ) , getFile1Location ( ) ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelBlob r... | org . junit . Assert . assertFalse ( actual ) |
generateDDL_whenTableIsNotYetPersisted_returnsDDLStringForColumnsToBeCreated ( ) { org . jkiss . dbeaver . ext . greenplum . model . PostgreTableColumn mockPostgreTableColumn = mockDbColumn ( "\'<sp>header<sp>)\n" 1 , "int4" , ( - 1 ) ) ; org . jkiss . dbeaver . ext . greenplum . model . PostgreTableColumn mockPostgreT... | org . junit . Assert . assertEquals ( expectedDDL , table . generateDDL ( monitor ) ) |
testFalse ( ) { java . util . Set < net . sourceforge . pmd . lang . java . ast . ASTBooleanLiteral > ops = net . sourceforge . pmd . lang . java . ParserTstUtil . getNodes ( net . sourceforge . pmd . lang . java . ast . ASTBooleanLiteral . class , net . sourceforge . pmd . lang . java . ast . ASTBooleanLiteralTest . T... | org . junit . Assert . assertFalse ( b . isTrue ( ) ) |
testBlockBlobCompactionSmallWrite ( ) { org . apache . hadoop . fs . Path path = getBlobPathWithTestName ( org . apache . hadoop . fs . azure . ITestOutputStreamSemantics . BLOCK_BLOB_COMPACTION_DIR ) ; try ( org . apache . hadoop . fs . FSDataOutputStream stream = fs . create ( path ) ) { "<AssertPlaceHolder>" ; byte ... | org . junit . Assert . assertTrue ( isBlockBlobAppendStreamWrapper ( stream ) ) |
testGetFactoryInboundMessage ( ) { org . apache . cxf . jaxrs . provider . ProviderFactory factory = org . apache . cxf . jaxrs . provider . ServerProviderFactory . getInstance ( ) ; org . apache . cxf . message . Message m = new org . apache . cxf . message . MessageImpl ( ) ; org . apache . cxf . message . Exchange e... | org . junit . Assert . assertSame ( org . apache . cxf . jaxrs . provider . ProviderFactory . getInstance ( m ) , factory ) |
testGetIdentifiable ( ) { service . put ( "key" , "value" ) ; com . google . appengine . api . memcache . MemcacheService . IdentifiableValue identifiable = service . getIdentifiable ( "key" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( "value" , identifiable . getValue ( ) ) |
shouldRespondWith200AndEmptyListOfRelationshipRepresentationsWhenGettingRelationshipsForANodeWithoutRelationships ( ) { long nodeId = org . neo4j . server . rest . web . RestfulGraphDatabaseTest . helper . createNode ( ) ; javax . ws . rs . core . Response response = org . neo4j . server . rest . web . RestfulGraphData... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testOnNodeDeletePreSizeErr ( ) { org . o3project . odenos . core . component . ConversionTable conversionTable = org . powermock . api . mockito . PowerMockito . spy ( new org . o3project . odenos . core . component . ConversionTable ( ) ) ; org . powermock . api . mockito . PowerMockito . doReturn ( "original" ) . whe... | org . junit . Assert . assertThat ( target . onNodeDeletePre ( org . o3project . odenos . component . aggregator . AggregatorTest . ORIGINAL_NW_ID , node1 ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testWriteAndReadFields ( ) { org . gradoop . common . model . impl . properties . PropertyValueList p1 = org . gradoop . common . model . impl . properties . PropertyValueList . fromPropertyValues ( com . google . common . collect . Lists . newArrayList ( org . gradoop . common . model . impl . properties . PropertyVal... | org . junit . Assert . assertEquals ( p1 , p2 ) |
testClearArguments ( ) { final org . apache . oozie . fluentjob . api . action . ShellActionBuilder builder = getBuilderInstance ( ) ; for ( final java . lang . String file : org . apache . oozie . fluentjob . api . action . TestShellActionBuilder . ARGS ) { builder . withArgument ( file ) ; } builder . clearArguments ... | org . junit . Assert . assertEquals ( 0 , argList . size ( ) ) |
testGetDataRecordBySiteMember ( ) { com . liferay . data . engine . model . DEDataDefinition deDataDefinition = com . liferay . data . engine . service . test . DEDataEngineTestUtil . insertDEDataDefinition ( _adminUser , _group , _deDataDefinitionService ) ; com . liferay . data . engine . model . DEDataRecordCollecti... | org . junit . Assert . assertEquals ( expectedDEDataRecord , deDataRecord ) |
testFlowOnFailureSkipped ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/flow_on_failure_skipped.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromF... | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
testStarGraph ( ) { edu . ucla . sspace . graph . isomorphism . Graph < edu . ucla . sspace . graph . isomorphism . Edge > g1 = new edu . ucla . sspace . graph . isomorphism . SparseUndirectedGraph ( ) ; g1 . add ( new edu . ucla . sspace . graph . isomorphism . SimpleEdge ( 0 , 1 ) ) ; g1 . add ( new edu . ucla . sspa... | org . junit . Assert . assertTrue ( isoTest . areIsomorphic ( g1 , g2 ) ) |
getTagsAsList_shouldReturnEmptyString_null ( ) { java . lang . String result = p . getTagsAsList ( null ) ; "<AssertPlaceHolder>" ; } getTagsAsList ( java . util . List ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( globalPropertyTags != null ) { int count = 0 ; for ( ch . puzzle . itc ... | org . junit . Assert . assertEquals ( "" , result ) |
testInstanceInitializer ( ) { com . thoughtworks . qdox . model . JavaInitializer init = mock ( com . thoughtworks . qdox . model . JavaInitializer . class ) ; when ( init . isStatic ( ) ) . thenReturn ( false ) ; when ( init . getBlockContent ( ) ) . thenReturn ( "//test" ) ; modelWriter . writeInitializer ( init ) ; ... | org . junit . Assert . assertEquals ( expected , modelWriter . toString ( ) ) |
testGetFactHandleEqualityBehavior ( ) { final org . kie . api . KieBaseConfiguration kbc = org . drools . core . impl . KnowledgeBaseFactory . newKnowledgeBaseConfiguration ( ) ; kbc . setOption ( EqualityBehaviorOption . EQUALITY ) ; final org . kie . api . KieBase kbase = org . drools . compiler . integrationtests . ... | org . junit . Assert . assertNotNull ( fh ) |
datumIngangDeelsOnbekend ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . BijhouderFiatteringsuitzondering bijhouderFiatteringsuitzondering = new nl . bzk . algemeenbrp . dal . domein . brp . entity . BijhouderFiatteringsuitzondering ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . PartijR... | org . junit . Assert . assertEquals ( 1 , errorCount ( bijhouderFiatteringsuitzondering ) ) |
testGetByModule ( ) { org . apache . usergrid . chop . webapp . dao . CommitDaoTest . LOG . info ( "\n===CommitDaoTest.testGetByModule===\n" ) ; java . util . List < org . apache . usergrid . chop . api . Commit > list = ESSuiteTest . commitDao . getByModule ( ESSuiteTest . MODULE_ID_2 ) ; for ( org . apache . usergrid... | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
getSelectedServiceKey ( ) { org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel m = new org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel ( ) ; long l = m . getSelectedServiceKey ( ) ; "<AssertPlaceHolder>" ; } getSelectedServiceKey ( ) { long l = m . getSelectedSer... | org . junit . Assert . assertEquals ( l , 0 ) |
testRemoveNormal ( ) { java . util . Map < java . lang . String , java . lang . Object > values = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; values . put ( "id" , 1 ) ; values . put ( "description" , "item:" ) ; values . put ( "price" , ( ( double ) ( SupportConst . I_TWENTY ) ) ) ;... | org . junit . Assert . assertTrue ( collection . isEmpty ( ) ) |
testSetInboundPassthruMode ( ) { gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry registry = gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . getInstance ( ) ; gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum serviceName = gov . hhs . fha . nhinc . con... | org . junit . Assert . assertEquals ( true , passthru ) |
testSwapEmptyLongArray ( ) { final long [ ] array = new long [ 0 ] ; org . fintx . util . Arrays . swap ( array , 0 , 2 ) ; "<AssertPlaceHolder>" ; } swap ( T , int , int ) { org . fintx . util . Arrays . swap ( array , offset1 , offset2 , 1 ) ; } | org . junit . Assert . assertEquals ( 0 , array . length ) |
getIndexOfFirstNonDiscreteCellTest ( ) { int [ ] [ ] cellData = new int [ ] [ ] { new int [ ] { 0 } , new int [ ] { 1 } , new int [ ] { 2 , 3 , 4 } , new int [ ] { 5 , 6 } } ; org . openscience . cdk . group . Partition p = new org . openscience . cdk . group . Partition ( cellData ) ; "<AssertPlaceHolder>" ; } getInde... | org . junit . Assert . assertEquals ( 2 , p . getIndexOfFirstNonDiscreteCell ( ) ) |
testGenerateDSNFailureMessage_nullMessageToTrack ( ) { org . apache . camel . Exchange exchange = new org . apache . camel . impl . DefaultExchange ( mock ( org . apache . camel . CamelContext . class ) ) ; java . util . Collection < org . nhindirect . common . tx . model . Tx > txs = new java . util . ArrayList < org ... | org . junit . Assert . assertNull ( dsnMessage ) |
toPrimitiveLongForEmptyString ( ) { "<AssertPlaceHolder>" ; } toPrimitiveLong ( java . lang . Object ) { java . lang . Long l = org . slim3 . util . LongUtil . toLong ( o ) ; if ( l == null ) { return 0 ; } return l . longValue ( ) ; } | org . junit . Assert . assertThat ( org . slim3 . util . LongUtil . toPrimitiveLong ( "" ) , org . hamcrest . CoreMatchers . is ( 0L ) ) |
testEncodeWellKnown ( ) { byte [ ] data = new byte [ ] { 12 , 10 , 15 , 14 , 11 , 10 , 11 , 14 } ; byte [ ] expected = new byte [ ] { 0 , 0 , 0 , 8 , 12 , 10 , 15 , 14 , 11 , 10 , 11 , 14 } ; try ( org . dcache . oncrpc4j . xdr . Xdr xdr = new org . dcache . oncrpc4j . xdr . Xdr ( 16 ) ) { xdr . beginEncoding ( ) ; org... | org . junit . Assert . assertArrayEquals ( expected , xdr . getBytes ( ) ) |
testFileSuppression ( ) { java . io . File file = new java . io . File ( "/test/testfile" ) ; profile . addFileSuppression ( file ) ; "<AssertPlaceHolder>" ; } isFileSuppressed ( java . io . File ) { java . io . File absoluteFile = makeAbsoluteFile ( file ) ; for ( com . googlecode . cppcheclipse . core . Suppression s... | org . junit . Assert . assertTrue ( profile . isFileSuppressed ( file ) ) |
testCastIntToShort ( ) { short expected = org . stjs . generator . exec . ints . IntToShort . method ( IntToShort . MAX_INT ) ; double expectedDouble = ( ( double ) ( expected ) ) ; "<AssertPlaceHolder>" ; } executeAndReturnNumber ( java . lang . Class ) { return executeAndReturnNumber ( clazz , null ) ; } | org . junit . Assert . assertEquals ( expectedDouble , executeAndReturnNumber ( org . stjs . generator . exec . ints . IntToShort . class ) , 0 ) |
testDefineClass ( ) { byte [ ] b = org . objenesis . instantiator . util . ClassDefinitionUtils . readClass ( className ) ; java . lang . Class < ? > c = org . objenesis . instantiator . util . ClassDefinitionUtils . defineClass ( className , b , org . objenesis . Objenesis . class , getClass ( ) . getClassLoader ( ) )... | org . junit . Assert . assertEquals ( c . getName ( ) , className ) |
testBuildWithDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . mark . scale . MarkScale context = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>MarkScale<sp>e<sp>" ; org . lnu . is ... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
union_empty_result ( ) { com . querydsl . core . types . SubQueryExpression < java . lang . Integer > sq1 = query ( ) . from ( com . querydsl . sql . Constants . employee ) . where ( employee . firstname . eq ( "XXX" ) ) . select ( employee . id ) ; com . querydsl . core . types . SubQueryExpression < java . lang . Int... | org . junit . Assert . assertTrue ( list . isEmpty ( ) ) |
setQualityWithValidArgument ( ) { instance . setQuality ( 50 ) ; "<AssertPlaceHolder>" ; } getQuality ( ) { return quality ; } | org . junit . Assert . assertEquals ( 50 , instance . getQuality ( ) ) |
shouldGetGraphIds ( ) { uk . gov . gchq . gaffer . federatedstore . operation . handler . impl . FederatedGetAllGraphIDHandler federatedGetAllGraphIDHandler = new uk . gov . gchq . gaffer . federatedstore . operation . handler . impl . FederatedGetAllGraphIDHandler ( ) ; uk . gov . gchq . gaffer . federatedstore . oper... | org . junit . Assert . assertEquals ( expected , actual ) |
testLsr ( ) { final org . apache . hadoop . conf . Configuration conf = org . apache . hadoop . hdfs . TestDFSShell . dfs . getConf ( ) ; final java . lang . String root = org . apache . hadoop . hdfs . TestDFSShell . createTree ( org . apache . hadoop . hdfs . TestDFSShell . dfs , "lsr" ) ; org . apache . hadoop . hdf... | org . junit . Assert . assertTrue ( results . contains ( "zzz" ) ) |
getCollectionSize_Property_NonCollection ( ) { org . pentaho . di . core . injection . bean . BeanInjector bi = new org . pentaho . di . core . injection . bean . BeanInjector ( null ) ; org . pentaho . di . core . injection . bean . BeanInjectionInfo bii = new org . pentaho . di . core . injection . bean . BeanInjecti... | org . junit . Assert . assertEquals ( ( - 1 ) , bi . getCollectionSize ( property , mbl1 . getSub ( ) ) ) |
testPutMetrics ( ) { org . apache . hadoop . metrics2 . MetricsRecord record = mock ( org . apache . hadoop . metrics2 . MetricsRecord . class ) ; when ( record . tags ( ) ) . thenReturn ( com . google . common . collect . Lists . newArrayList ( new org . apache . hadoop . metrics2 . MetricsTag ( org . apache . hadoop ... | org . junit . Assert . assertEquals ( jsonLines . toString ( ) , jsonResult ) |
getSelectedTemplateKey ( ) { model . setSelectedTemplateKey ( 101L ) ; "<AssertPlaceHolder>" ; } getSelectedTemplateKey ( ) { return selectedTemplateKey ; } | org . junit . Assert . assertEquals ( 101L , model . getSelectedTemplateKey ( ) ) |
test3 ( ) { final org . eclipse . kapua . client . gateway . Topic topic = org . eclipse . kapua . client . gateway . Topic . of ( new java . util . LinkedList ( java . util . Arrays . asList ( "foo" , "bar" ) ) ) ; "<AssertPlaceHolder>" ; } getSegments ( ) { return segments ; } | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "foo" , "bar" ) , topic . getSegments ( ) ) |
shouldFireEventsToPublishConsoleOutput ( ) { org . infinitest . testrunner . RunnerEventSupport eventSupport = new org . infinitest . testrunner . RunnerEventSupport ( this ) ; final java . lang . StringBuffer updatedText = new java . lang . StringBuffer ( ) ; eventSupport . addConsoleOutputListener ( new org . infinit... | org . junit . Assert . assertEquals ( "hello" , updatedText . toString ( ) ) |
testSlowConnection ( ) { org . opennms . netmgt . jasper . measurement . remote . Result result = new org . opennms . netmgt . jasper . measurement . remote . MeasurementApiClient ( ) . execute ( false , "http://localhost:9999/opennms/rest/measurements/slow-response" , null , null , "<dummy<sp>request>" ) ; "<AssertPla... | org . junit . Assert . assertTrue ( result . wasSuccessful ( ) ) |
testMultipleParameterStoreInvocationsReturnSameParam ( ) { org . ocpsoft . rewrite . servlet . config . Path path = org . ocpsoft . rewrite . servlet . config . Path . matches ( "/something/#{param}" ) ; org . ocpsoft . rewrite . param . ParameterStore store = new org . ocpsoft . rewrite . param . DefaultParameterStore... | org . junit . Assert . assertTrue ( ( p1 == p2 ) ) |
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . specoffer . SpecOfferSubject entity = new org . lnu . is . domain . specoffer . SpecOfferSubject ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashM... | org . junit . Assert . assertEquals ( expected , actual ) |
featureTagTest ( ) { java . util . List < java . lang . String > existingTags = new java . util . ArrayList ( ) ; for ( com . github . bogdanlivadariu . reporting . cucumber . json . models . Feature f : reports . getFeatures ( ) ) { for ( com . github . bogdanlivadariu . reporting . cucumber . json . models . Tag t : ... | org . junit . Assert . assertEquals ( expectedTags , existingTags ) |
test_partition_frozen_assign ( ) { com . noctarius . snowcast . impl . SequencerDefinition definition = new com . noctarius . snowcast . impl . SequencerDefinition ( "empty" , com . noctarius . snowcast . SnowcastEpoch . byTimestamp ( 1 ) , 128 , ( ( short ) ( 1 ) ) ) ; com . hazelcast . nio . Address address = new com... | org . junit . Assert . assertNotNull ( logicalNodeId ) |
testWaitOnEnlistedReceivesFailures ( ) { bitronix . tm . journal . nio . List < bitronix . tm . journal . nio . Future < java . lang . Boolean > > futures = doTestWaitOnEnlistedWithFailure ( ) ; for ( bitronix . tm . journal . nio . Future < java . lang . Boolean > future : futures ) "<AssertPlaceHolder>" ; } get ( ) {... | org . junit . Assert . assertFalse ( future . get ( ) ) |
testCuboidCounts2 ( ) { org . apache . kylin . cube . model . CubeDesc cube = getTestKylinCubeWithoutSellerLeftJoin ( ) ; org . apache . kylin . cube . cuboid . CuboidScheduler cuboidScheduler = cube . getInitialCuboidScheduler ( ) ; int [ ] counts = org . apache . kylin . cube . cuboid . CuboidCLI . calculateAllLevelC... | org . junit . Assert . assertEquals ( cuboidScheduler . getCuboidCount ( ) , sum ) |
testCreateRowFieldWithNonText ( ) { try { executeString ( ( "CREATE<sp>TABLE<sp>hbase_mapped_table2<sp>(rk1<sp>int4,<sp>rk2<sp>text,<sp>col3<sp>text,<sp>col4<sp>text)<sp>" + ( "TABLESPACE<sp>cluster1<sp>USING<sp>hbase<sp>WITH<sp>('table'='hbase_table',<sp>'columns'='0:key#b,1:key,col3:,col2:b',<sp>" + "'hbase.rowkey.de... | org . junit . Assert . assertTrue ( ( ( e . getMessage ( ) . indexOf ( "Key<sp>field<sp>type<sp>should<sp>be<sp>TEXT<sp>type" ) ) >= 0 ) ) |
testWasIOSuccessfulWithRunnableWhenNoErrorsAreRecorded ( ) { final org . codice . ddf . util . function . ThrowingRunnable < java . io . IOException > code = ( ) -> { } ; "<AssertPlaceHolder>" ; } wasIOSuccessful ( org . codice . ddf . util . function . ThrowingRunnable ) { final int nerrs = this . numErrors ; if ( cod... | org . junit . Assert . assertThat ( report . wasIOSuccessful ( code ) , org . hamcrest . Matchers . equalTo ( true ) ) |
return_empty_list_iterator_guava ( ) { java . util . Iterator < java . lang . String > strings = com . google . common . collect . Iterators . emptyIterator ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( strings . hasNext ( ) ) |
shouldRejectId ( ) { cluster . setId ( 2 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = cTest . validate ( cluster , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . resul... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) ) |
testCreateEndpointWithArgs2 ( ) { java . lang . String args = "arg1<sp>\"arg2<sp>\"<sp>arg3" ; org . apache . camel . component . exec . ExecEndpoint e = createExecEndpoint ( ( "exec:test?args=" + ( org . apache . camel . util . UnsafeUriCharactersEncoder . encode ( args ) ) ) ) ; "<AssertPlaceHolder>" ; } getArgs ( ) ... | org . junit . Assert . assertEquals ( args , e . getArgs ( ) ) |
prefersGenreDescriptionOverGenreID ( ) { com . github . marabou . audio . ID3v24Tag id3v24Tag = new com . github . marabou . audio . ID3v24Tag ( ) ; id3v24Tag . setGenre ( 1 ) ; id3v24Tag . setGenreDescription ( "Death<sp>Metal" ) ; final com . github . marabou . audio . Mp3File mp3FileMock = mock ( com . github . mara... | org . junit . Assert . assertEquals ( "Death<sp>Metal" , audioFile . getGenre ( ) ) |
testHashCode ( ) { org . jfree . chart . axis . NumberTickUnit t1 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" ) ) ; org . jfree . chart . axis . NumberTickUnit t2 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" )... | org . junit . Assert . assertEquals ( h1 , h2 ) |
treatsEmptyPathAsRoot_recognizedCommand ( ) { codec . defineCommand ( "num" , org . openqa . selenium . remote . http . HttpMethod . POST , "/" ) ; byte [ ] data = "{\"char\":\"水\"}" . getBytes ( org . openqa . selenium . remote . http . UTF_8 ) ; org . openqa . selenium . remote . http . HttpRequest request = new org ... | org . junit . Assert . assertThat ( command . getName ( ) , org . hamcrest . Matchers . is ( "num" ) ) |
testUpdateByteArayField_Null ( ) { byte [ ] salt = new byte [ 64 ] ; com . jmethods . catatumbo . EntityManagerTest . random . nextBytes ( salt ) ; com . jmethods . catatumbo . entities . ByteArrayField entity = new com . jmethods . catatumbo . entities . ByteArrayField ( ) ; entity . setSalt ( salt ) ; entity = com . ... | org . junit . Assert . assertTrue ( ( ( entity . getSalt ( ) ) == null ) ) |
apiAuthenticationExceptionHandler_shouldReturnUnauthorizedIfNotLoggedIn ( ) { org . openmrs . api . context . Context . logout ( ) ; controller . apiAuthenticationExceptionHandler ( new org . openmrs . api . APIAuthenticationException ( ) , request , response ) ; "<AssertPlaceHolder>" ; } apiAuthenticationExceptionHand... | org . junit . Assert . assertThat ( response . getStatus ( ) , org . hamcrest . Matchers . is ( HttpServletResponse . SC_UNAUTHORIZED ) ) |
testRemoveServerProfileSchemaByAppId ( ) { org . kaaproject . kaa . common . dto . ApplicationDto app = generateApplicationDto ( ) ; generateServerProfileSchema ( null , null ) ; generateServerProfileSchema ( null , null ) ; generateServerProfileSchema ( null , null ) ; generateServerProfileSchema ( null , null ) ; gen... | org . junit . Assert . assertTrue ( found . isEmpty ( ) ) |
testReconnectAfterCloseThroughSessionId ( ) { org . nuxeo . ecm . core . api . DocumentModel file = session . createDocumentModel ( "/" , "file" , "File" ) ; file = session . createDocument ( file ) ; session . save ( ) ; session = coreFeature . reopenCoreSession ( ) ; "<AssertPlaceHolder>" ; } getCoreSession ( ) { org... | org . junit . Assert . assertNull ( file . getCoreSession ( ) ) |
testGetBusinessObjectDataAttributeSubPartitionValuesCount4 ( ) { org . finra . herd . model . api . xml . BusinessObjectDataAttributeKey businessObjectDataAttributeKey = new org . finra . herd . model . api . xml . BusinessObjectDataAttributeKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE ,... | org . junit . Assert . assertEquals ( businessObjectDataAttribute , result ) |
testWrapSingle ( ) { org . onebusaway . nyc . queue . Publisher p = new org . onebusaway . nyc . queue . Publisher ( "topic" ) { java . lang . String generateUUID ( ) { return "foo" ; } long getTimeReceived ( ) { return 1234567 ; } } ; byte [ ] buff = "<sp>" . getBytes ( ) ; java . lang . String envelope = p . wrap ( b... | org . junit . Assert . assertEquals ( null , envelope ) |
saveUserVerifierNullVerifierDtoTest ( ) { org . kaaproject . kaa . common . dto . user . UserVerifierDto found = verifierService . saveUserVerifier ( null ) ; "<AssertPlaceHolder>" ; } saveUserVerifier ( org . kaaproject . kaa . common . dto . user . UserVerifierDto ) { org . kaaproject . kaa . server . common . dao . ... | org . junit . Assert . assertNull ( found ) |
testPeriodicalFlush ( ) { org . apache . distributedlog . service . DistributedLogClient client = mock ( org . apache . distributedlog . service . DistributedLogClient . class ) ; org . apache . distributedlog . client . DistributedLogMultiStreamWriter writer = org . apache . distributedlog . client . DistributedLogMul... | org . junit . Assert . assertEquals ( dlsn , writeDLSN ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . UserNotificationDelivery . class , _dynamicQueryClassLoader ) ; dynamicQuery . ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
givenHasTransactionId_thenIgnored ( ) { final java . lang . reflect . Method actionMethod = findMethod ( org . apache . isis . core . metamodel . facets . actions . action . ActionAnnotationFacetFactoryTest . SomeTransactionalId . class , "someAction" ) ; facetFactory . processCommand ( new org . apache . isis . core .... | org . junit . Assert . assertNull ( facet ) |
testCreateManualSampler ( ) { System . out . println ( "createManualSampler" ) ; java . lang . String name = "gentest" ; org . netbeans . modules . sampler . Sampler result = org . netbeans . modules . sampler . Sampler . createManualSampler ( name ) ; "<AssertPlaceHolder>" ; } createManualSampler ( java . lang . Strin... | org . junit . Assert . assertNotNull ( result ) |
testCookieMatch3 ( ) { org . apache . ogt . http . cookie . CookieSpec cookiespec = new org . apache . ogt . http . impl . cookie . BrowserCompatSpec ( ) ; org . apache . ogt . http . impl . cookie . BasicClientCookie cookie = new org . apache . ogt . http . impl . cookie . BasicClientCookie ( "name" , "value" ) ; cook... | org . junit . Assert . assertTrue ( cookiespec . match ( cookie , origin ) ) |
testGetErrorType ( ) { org . jinstagram . entity . common . Meta fixture = new org . jinstagram . entity . common . Meta ( ) ; fixture . setErrorType ( "" ) ; fixture . setCode ( 1 ) ; fixture . setErrorMessage ( "" ) ; java . lang . String result = fixture . getErrorType ( ) ; "<AssertPlaceHolder>" ; } getErrorType ( ... | org . junit . Assert . assertEquals ( "" , result ) |
testExecuteFailByValidate ( ) { com . ctrip . platform . dal . dao . task . DalRequestExecutor test = new com . ctrip . platform . dal . dao . task . DalRequestExecutor ( ) ; java . sql . SQLException ex = new java . sql . SQLException ( "Test" ) ; com . ctrip . platform . dal . dao . task . DalRequestExecutorTest . Te... | org . junit . Assert . assertEquals ( ex , e ) |
testMatchesWithParameters ( ) { org . ocpsoft . rewrite . servlet . config . Path path = org . ocpsoft . rewrite . servlet . config . Path . matches ( "/application/{seg}" ) ; org . ocpsoft . rewrite . mock . MockEvaluationContext context = new org . ocpsoft . rewrite . mock . MockEvaluationContext ( ) ; org . ocpsoft ... | org . junit . Assert . assertTrue ( path . evaluate ( rewrite , context ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.