input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
drop_A$int_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( ) ; int n = 3 ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > actual = seq . drop ( n ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; } | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
respondInterrupt ( ) { java . util . concurrent . atomic . AtomicReference < java . lang . Throwable > intr = new java . util . concurrent . atomic . AtomicReference ( ) ; io . trane . future . Promise < java . lang . Integer > p = io . trane . future . Promise . apply ( intr :: set ) ; io . trane . future . Responder ... | org . junit . Assert . assertEquals ( ex , intr . get ( ) ) |
test_bs_match_string2 ( ) { org . jerlang . type . Binary expected = new org . jerlang . type . Binary ( new int [ ] { 1 , 2 } ) ; org . jerlang . type . List params = org . jerlang . type . List . of ( new org . jerlang . type . Binary ( new int [ ] { 16 , 1 , 2 } ) ) ; org . jerlang . type . Term result = org . jerla... | org . junit . Assert . assertEquals ( expected , result ) |
testFilterString10 ( ) { java . lang . String filter = ( org . opennms . features . topology . plugins . topo . asset . layers . NodeParamLabels . ASSET_DISPLAYCATEGORY ) + "=!~.*_5" ; java . lang . String expected = "nodeList:{<sp>[0]<sp>[1]<sp>[2]<sp>[3]<sp>[4]<sp>[6]<sp>[7]<sp>[8]<sp>[9]<sp>[10]<sp>[11]<sp>[12]<sp>[... | org . junit . Assert . assertEquals ( expected , s2 ) |
givenUsingApacheCommons_whenConcatenatingUsingChainedIterable_thenCorrect ( ) { org . baeldung . java . collections . Collection < java . lang . String > collectionA = asList ( "S" , "T" ) ; org . baeldung . java . collections . Collection < java . lang . String > collectionB = asList ( "U" , "V" ) ; java . lang . Iter... | org . junit . Assert . assertEquals ( asList ( "S" , "T" , "U" , "V" ) , collectionCombined ) |
testHttpProxy ( ) { net . dongliu . requests . RawResponse response = net . dongliu . requests . Requests . get ( "https://www.google.com" ) . proxy ( net . dongliu . requests . Proxies . httpProxy ( "127.0.0.1" , 1081 ) ) . send ( ) ; response . close ( ) ; "<AssertPlaceHolder>" ; } statusCode ( ) { return statusCode ... | org . junit . Assert . assertEquals ( 200 , response . statusCode ( ) ) |
testAddServiceNull ( ) { try { broker . addService ( null ) ; org . junit . Assert . fail ( "ConfigurationException<sp>expected" ) ; } catch ( flex . messaging . config . ConfigurationException ce ) { int error = flex . messaging . config . ConfigurationConstants . NULL_COMPONENT ; "<AssertPlaceHolder>" ; } } getNumber... | org . junit . Assert . assertTrue ( ( ( ce . getNumber ( ) ) == error ) ) |
empty ( ) { try ( org . jooby . internal . ReaderInputStream reader = new org . jooby . internal . ReaderInputStream ( new java . io . StringReader ( "" ) , UTF_8 ) ) { "<AssertPlaceHolder>" ; } } read ( ) { byte [ ] b = new byte [ 1 ] ; return ( read ( b ) ) == ( - 1 ) ? - 1 : ( b [ 0 ] ) & 255 ; } | org . junit . Assert . assertEquals ( ( - 1 ) , reader . read ( ) ) |
naoDeveApendarNadaSeOtamanhoEhMenorQueAString ( ) { java . lang . String value = "12345" ; java . lang . String result = br . com . caelum . stella . boleto . utils . StellaStringUtils . leftPadWithZeros ( value , 4 ) ; "<AssertPlaceHolder>" ; } leftPadWithZeros ( java . lang . String , int ) { if ( input == null ) { r... | org . junit . Assert . assertEquals ( "12345" , result ) |
testValue ( ) { net . ontopia . topicmaps . rest . model . VariantName variant = get ( "4" , net . ontopia . topicmaps . rest . model . VariantName . class ) ; variant . setValue ( "Another<sp>value" ) ; net . ontopia . topicmaps . rest . model . VariantName changed = post ( "4" , variant , net . ontopia . topicmaps . ... | org . junit . Assert . assertEquals ( "Another<sp>value" , changed . getValue ( ) ) |
setErrorCode_chargePointErrorCode_errorCodeIsSet ( ) { eu . chargetime . ocpp . model . core . ChargePointErrorCode chargePointErrorCode = eu . chargetime . ocpp . model . core . ChargePointErrorCode . NoError ; request . setErrorCode ( chargePointErrorCode ) ; "<AssertPlaceHolder>" ; } getErrorCode ( ) { return errorC... | org . junit . Assert . assertThat ( request . getErrorCode ( ) , org . hamcrest . CoreMatchers . equalTo ( chargePointErrorCode ) ) |
testGetSystemConfigsWithoutData ( ) { new java . io . File ( jenkinsHome , "config-history" ) . renameTo ( new java . io . File ( jenkinsHome , "invalid" ) ) ; final java . io . File [ ] systemConfigs = sutWithoutUserAndDuplicateHistory . getSystemConfigs ( ) ; "<AssertPlaceHolder>" ; } getSystemConfigs ( ) { return re... | org . junit . Assert . assertEquals ( 0 , systemConfigs . length ) |
testStringTypeMismatch ( ) { org . stringtemplate . v4 . test . ErrorBuffer errors = new org . stringtemplate . v4 . test . ErrorBuffer ( ) ; org . stringtemplate . v4 . test . STGroup group = new org . stringtemplate . v4 . test . STGroup ( ) ; group . setListener ( errors ) ; org . stringtemplate . v4 . test . ST e =... | org . junit . Assert . assertEquals ( errorExpecting , errors . toString ( ) ) |
testJDK5 ( ) { net . sourceforge . cobertura . jdk . JDKTest . setupAndExecuteTest ( "1.5" ) ; int hitCount = net . sourceforge . cobertura . test . util . TestUtils . getTotalHitCount ( net . sourceforge . cobertura . jdk . JDKTest . dom , "mypackage.JDKTEST" , "main" ) ; "<AssertPlaceHolder>" ; } getTotalHitCount ( g... | org . junit . Assert . assertEquals ( 2 , hitCount ) |
testDecompressReturnsWhenNothingToDecompress ( ) { org . apache . hadoop . io . compress . zstd . ZStandardDecompressor decompressor = new org . apache . hadoop . io . compress . zstd . ZStandardDecompressor ( IO_FILE_BUFFER_SIZE_DEFAULT ) ; int result = decompressor . decompress ( new byte [ 10 ] , 0 , 10 ) ; "<Assert... | org . junit . Assert . assertEquals ( 0 , result ) |
createDynamicModule ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . reflections . ReflectionsScanner . class , de . devsurf . injection . guice . scanner ... | org . junit . Assert . assertNotNull ( injector ) |
characteristic_set_reducer_04 ( ) { org . apache . hadoop . mrunit . mapreduce . MapReduceDriver < org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , or... | org . junit . Assert . assertEquals ( ( expectTwo ? 2 : 1 ) , cw . getCount ( ) . get ( ) ) |
testNullDefaultValue ( ) { final org . apache . logging . log4j . core . config . plugins . validation . ValidatingPluginWithTypedBuilder validatingPlugin = ( ( org . apache . logging . log4j . core . config . plugins . validation . ValidatingPluginWithTypedBuilder ) ( new org . apache . logging . log4j . core . config... | org . junit . Assert . assertNull ( validatingPlugin ) |
testSameLSNHaveSameHash ( ) { org . postgresql . replication . LogSequenceNumber first = org . postgresql . replication . LogSequenceNumber . valueOf ( "0/15D690F8" ) ; org . postgresql . replication . LogSequenceNumber second = org . postgresql . replication . LogSequenceNumber . valueOf ( "0/15D690F8" ) ; "<AssertPla... | org . junit . Assert . assertThat ( first . hashCode ( ) , org . hamcrest . CoreMatchers . equalTo ( second . hashCode ( ) ) ) |
testList ( ) { java . util . List < net . magja . model . country . Country > countries = service . list ( ) ; for ( net . magja . model . country . Country country : countries ) { net . magja . service . country . CountryRemoteServiceITest . log . info ( "{}" , country . toString ( ) ) ; } "<AssertPlaceHolder>" ; } to... | org . junit . Assert . assertFalse ( countries . isEmpty ( ) ) |
testMultiWindowCanBeSet ( ) { configuration . setSingleWindow ( false ) ; "<AssertPlaceHolder>" ; } isSingleWindow ( ) { if ( isSet ( com . thoughtworks . selenium . BrowserConfigurationOptions . SINGLE_WINDOW ) ) { return true ; } return false ; } | org . junit . Assert . assertTrue ( ( ! ( configuration . isSingleWindow ( ) ) ) ) |
test_setContextualizedObject_Provided ( ) { ch . puzzle . itc . mobiliar . business . resourcerelation . entity . ResourceRelationContextEntity e = new ch . puzzle . itc . mobiliar . business . resourcerelation . entity . ResourceRelationContextEntity ( ) ; ch . puzzle . itc . mobiliar . business . resourcerelation . e... | org . junit . Assert . assertEquals ( contextualizedObject , e . getContextualizedObject ( ) ) |
testNodeChildrenCreatedUntil ( ) { long start = java . lang . System . currentTimeMillis ( ) ; activity = createActivity ( ( "ActivityDescendantsCreatedUntil-" + start ) ) ; java . util . List < com . ibm . sbt . services . client . connections . activities . ActivityNode > nodes = createActivityDescendants ( activity ... | org . junit . Assert . assertEquals ( 2 , activityNodes . size ( ) ) |
handleIllegalArgumentExceptionShouldReturnIt ( ) { java . lang . IllegalArgumentException e = new java . lang . IllegalArgumentException ( ) ; "<AssertPlaceHolder>" ; } handle ( java . lang . Throwable ) { if ( e instanceof org . codegist . crest . CRestException ) { return org . codegist . crest . CRestException . han... | org . junit . Assert . assertSame ( e , org . codegist . crest . CRestException . handle ( e ) ) |
testIsUndefined01 ( ) { java . util . List < org . dresdenocl . modelinstancetype . types . IModelInstanceString > elements01 ; elements01 = new java . util . ArrayList < org . dresdenocl . modelinstancetype . types . IModelInstanceString > ( ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . ... | org . junit . Assert . assertFalse ( modelInstanceCollection01 . isUndefined ( ) ) |
test_shrink ( ) { org . eclipse . gef . geometry . planar . Rectangle prect = new org . eclipse . gef . geometry . planar . Rectangle ( new org . eclipse . gef . geometry . planar . Rectangle ( 100 , 100 , 250 , 250 ) ) ; org . eclipse . gef . geometry . planar . Rectangle copy = prect . getCopy ( ) ; prect . translate... | org . junit . Assert . assertTrue ( ( ! ( prect . equals ( copy ) ) ) ) |
testSaveNonce ( ) { org . verisign . joid . db . TestDbStore . dbStore . saveNonce ( org . verisign . joid . db . TestDbStore . nonce ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertNotNull ( org . verisign . joid . db . TestDbStore . nonce . getId ( ) ) |
normalizedNodesToJsonTest ( ) { final org . opendaylight . yangtools . yang . data . api . schema . DataContainerChild < ? extends org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier . PathArgument , ? > baz = org . opendaylight . yangtools . yang . data . codec . gson . YangModeledAnyXmlSupport... | org . junit . Assert . assertEquals ( expextedJson , serializedJson ) |
shouldRedefineToString ( ) { com . danidemi . tutorial . tdd . showcase . accounting . Invoice tested = new com . danidemi . tutorial . tdd . showcase . accounting . Invoice ( 12L , 3400 ) ; "<AssertPlaceHolder>" ; } redefineToString ( ) { return new com . danidemi . tutorial . tdd . showcase . hamcrest . RedefineToStr... | org . junit . Assert . assertThat ( tested , redefineToString ( ) ) |
test_attach_detach_reattach_concurrently ( ) { com . noctarius . snowcast . impl . SequencerDefinition definition = new com . noctarius . snowcast . impl . SequencerDefinition ( "empty" , com . noctarius . snowcast . SnowcastEpoch . byTimestamp ( 1 ) , 128 , ( ( short ) ( 1 ) ) ) ; final com . noctarius . snowcast . im... | org . junit . Assert . assertEquals ( concurrencyLevel , logicalNodeIds . size ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . message . boards . model . MBStatsUser newMBStatsUser = addMBStatsUser ( ) ; com . liferay . message . boards . model . MBStatsUser existingMBStatsUser = _persistence . fetchByPrimaryKey ( newMBStatsUser . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ... | org . junit . Assert . assertEquals ( existingMBStatsUser , newMBStatsUser ) |
deleteNonRecursiveOnServiceException ( ) { org . mockito . Mockito . when ( mClient . listFiles ( org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . anyInt ( ) , org . mockito . Matchers . eq ( null ) ) ) . thenThrow ( alluxio . underfs . kodo . Exception . ... | org . junit . Assert . assertFalse ( result ) |
testParseVoidInput ( ) { when ( view . getPattern ( ) ) . thenReturn ( "" ) ; presenter . viewUpdated ( ) ; verify ( view ) . error ( ) ; "<AssertPlaceHolder>" ; } getPattern ( ) { return searchPatternTextBox . getText ( ) ; } | org . junit . Assert . assertNull ( presenter . getPattern ( ) ) |
testGetPosixViewSetOwner ( ) { java . nio . file . Path rootPath = java . nio . file . Paths . get ( hdfs . jsr203 . TestUserPrincipalLookupService . clusterUri ) ; java . nio . file . attribute . UserPrincipalLookupService lus = rootPath . getFileSystem ( ) . getUserPrincipalLookupService ( ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertNotNull ( lus ) |
testConstants_1 ( ) { org . jinstagram . model . Constants result = new org . jinstagram . model . Constants ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( result ) |
testRemoveAccents ( ) { logger . info ( "removeAccents" ) ; java . lang . String text = "'','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''" ; java . lang . S... | org . junit . Assert . assertEquals ( expResult , result ) |
isTimedOut_beforeAcceptedDifference_expectFalse ( ) { tested . update ( ) ; java . lang . Thread . sleep ( 1000 ) ; "<AssertPlaceHolder>" ; } isTimedOut ( long ) { return ( TimeUnit . NANOSECONDS . toSeconds ( getLastUpdateDifference ( ) ) ) > acceptedSecondsDifference ; } | org . junit . Assert . assertFalse ( tested . isTimedOut ( 10 ) ) |
begin_field_eof ( ) { java . lang . String [ ] [ ] result = read ( "" ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFir... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( new java . lang . String [ 0 ] [ ] ) ) |
testUploadFile ( ) { test . connect ( ) ; test . uploadFile ( "src/test/resources/upload.txt" , "target/uploaded.txt" ) ; test . disconnect ( ) ; java . io . File uploaded = new java . io . File ( "target/uploaded.txt" ) ; "<AssertPlaceHolder>" ; } disconnect ( ) { if ( ( c ) != null ) { com . infinit . sftp . SftpClie... | org . junit . Assert . assertTrue ( uploaded . exists ( ) ) |
testGetRowValue ( ) { org . sagebionetworks . table . model . SparseRow row = changeSet . addEmptyRow ( ) ; java . lang . String columnId = stringColumn . getId ( ) ; row . setCellValue ( columnId , "foo" ) ; java . lang . String value = row . getCellValue ( columnId ) ; "<AssertPlaceHolder>" ; } getCellValue ( java . ... | org . junit . Assert . assertEquals ( "foo" , value ) |
testReduceTaskReportsWithNullJob ( ) { org . apache . hadoop . mapred . JobClient client = new org . apache . hadoop . mapred . JobClient ( ) ; org . apache . hadoop . mapreduce . Cluster mockCluster = mock ( org . apache . hadoop . mapreduce . Cluster . class ) ; client . cluster = mockCluster ; org . apache . hadoop ... | org . junit . Assert . assertEquals ( 0 , result . length ) |
testSelectBinary ( ) { database . save ( new com . orientechnologies . orient . core . record . impl . ORecordBytes ( "blabla" . getBytes ( ) ) , "BlobCluster" ) ; java . util . List < com . orientechnologies . orient . core . record . ORecord > res = database . query ( new com . orientechnologies . orient . core . sql... | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
testTemplate ( ) { freemarker . template . Configuration cfg = org . geoserver . template . TemplateUtils . getSafeConfiguration ( ) ; cfg . setObjectWrapper ( new org . geoserver . template . FeatureWrapper ( ) ) ; cfg . setClassForTemplateLoading ( org . geoserver . wms . featureinfo . FeatureTemplate . class , "" ) ... | org . junit . Assert . assertNotNull ( template ) |
testUpdateList ( ) { java . lang . String message = "lists<sp>should<sp>be<sp>set<sp>appropriately" ; org . eurekastreams . server . domain . TabGroup sut = new org . eurekastreams . server . domain . TabGroup ( ) ; java . util . ArrayList < org . eurekastreams . server . domain . Tab > tabs = new java . util . ArrayLi... | org . junit . Assert . assertEquals ( message , tabs , sut . getTabs ( ) ) |
testGetSupplierRevenue_invalidDateRange ( ) { roles . add ( addOrgToRole ( organization , OrganizationRoleType . PLATFORM_OPERATOR ) ) ; org . oscm . reportingservice . business . model . supplierrevenue . RDOPlatformRevenue result = reporting . getPlatformRevenueReport ( org . oscm . reportingservice . bean . Reportin... | org . junit . Assert . assertEquals ( 0 , result . getSupplierDetails ( ) . size ( ) ) |
testBuildEmptyParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . specoffer . SpecOffer specOffer = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; org . lnu . is . domain . wave . type . WaveType waveType = new org . lnu . is . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testToStringEmptyValueNonEmptyCustomFacts ( ) { org . gedcom4j . model . StringWithCustomFacts swct = new org . gedcom4j . model . StringWithCustomFacts ( ) ; swct . value = "" ; swct . getCustomFacts ( true ) . add ( new org . gedcom4j . model . CustomFact ( "_TEST" ) ) ; "<AssertPlaceHolder>" ; } add ( org . gedcom4j... | org . junit . Assert . assertEquals ( "" , ( "" + swct ) ) |
testInserirPosicaoAlemDoTamanho ( ) { br . com . senacrs . alp . aulas . MinhaLista < java . lang . String > obj = null ; java . lang . String valor = null ; int posicao = 0 ; obj = criarMinhaListaDeStringComPrefixo ( "string-" , 10 ) ; valor = "novo<sp>valor" ; posicao = 11 ; try { obj . inserir ( posicao , valor ) ; ... | org . junit . Assert . assertTrue ( true ) |
testEqualityDifferentPrimitive ( ) { javax . measure . Quantity < javax . measure . quantity . Length > value = tec . units . ri . quantity . Quantities . getQuantity ( 10 , Units . METRE ) ; javax . measure . Quantity < javax . measure . quantity . Length > anotherValue = tec . units . ri . quantity . Quantities . get... | org . junit . Assert . assertEquals ( value , anotherValue ) |
pauseSession_sessionIsInactive_stateIsNotChanged ( ) { target . pauseSession ( ) ; target . pauseSession ( ) ; target . pauseSession ( ) ; "<AssertPlaceHolder>" ; } getSessionState ( ) { if ( ( this . session ) != null ) { return this . session . isPaused ( ) ? com . amazonaws . mobileconnectors . amazonmobileanalytics... | org . junit . Assert . assertEquals ( target . getSessionState ( ) , SessionState . INACTIVE ) |
testModelNameWithNonEmptyExistingName ( ) { final org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View , org . kie . workbench . common . stunner . core . graph . Edge > existingRoot = ( ( org . kie . workbench . common . stunne... | org . junit . Assert . assertEquals ( org . kie . workbench . common . dmn . api . factory . DMNDiagramFactoryImplTest . EXISTING_NAME , newDMNDefinitions . getName ( ) . getValue ( ) ) |
toDocument ( ) { final org . apache . rya . api . domain . RyaType ryaType = org . apache . rya . api . resolver . RdfToRyaConversions . convertLiteral ( org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) . createLiteral ( 4.5 ) ) ; final org . bson . Document document = new org . apache . rya ... | org . junit . Assert . assertEquals ( expected , document ) |
conventionPropertyTakesPrecedenceOverParentProperty ( ) { org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . Bean parent = new org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . Bean ( ) ; parent . defineProperty ( "conventionProperty" , "parent" ) ; org . gradle . internal . e... | org . junit . Assert . assertThat ( bean . getProperty ( "conventionProperty" ) , org . hamcrest . Matchers . equalTo ( ( ( java . lang . Object ) ( "value" ) ) ) ) |
testCreateValueURL ( ) { java . lang . String urlString = "http://commons.apache.org" ; java . net . URL result = org . apache . commons . cli . TypeHandler . createValue ( urlString , PatternOptionBuilder . URL_VALUE ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder buf = new java . lang .... | org . junit . Assert . assertEquals ( urlString , result . toString ( ) ) |
testBinarySearch ( ) { com . questdb . std . LongMatrix < java . lang . String > m = new com . questdb . std . LongMatrix ( 2 ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { int r = m . addRow ( ) ; m . set ( r , 0 , i ) ; m . set ( r , 1 , i ) ; m . set ( r , ( "s" + i ) ) ; } int r = m . binarySearch ( 631 ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( 631 , m . get ( r , 0 ) ) |
shouldGetAsReference ( ) { org . springframework . beans . factory . config . RuntimeBeanReference reference = this . registeredBeanDefinition . asReference ( ) ; "<AssertPlaceHolder>" ; } getBeanName ( ) { return this . beanName ; } | org . junit . Assert . assertThat ( reference . getBeanName ( ) , org . hamcrest . Matchers . is ( this . name ) ) |
fromClassToClass ( ) { java . lang . Class c = org . raml . utilities . types . Cast . toClass ( org . raml . utilities . types . CastTest . class ) ; "<AssertPlaceHolder>" ; } toClass ( java . lang . reflect . Type ) { if ( type instanceof java . lang . reflect . ParameterizedType ) { java . lang . reflect . Parameter... | org . junit . Assert . assertSame ( org . raml . utilities . types . CastTest . class , c ) |
testGCStability ( ) { final int N = 10000 ; final int M = 5000000 ; System . out . println ( ( ( ( ( "[testGCStability]<sp>testing<sp>GC<sp>stability<sp>with<sp>" + N ) + "<sp>bitmaps<sp>containing<sp>~" ) + ( M / N ) ) + "<sp>values<sp>each<sp>on<sp>average" ) ) ; System . out . println ( ( "Universe<sp>size<sp>=<sp>"... | org . junit . Assert . assertEquals ( totalcard , M ) |
testDuplicateModel ( ) { final org . kie . api . KieServices ks = KieServices . Factory . get ( ) ; final org . kie . api . builder . KieFileSystem kfs = ks . newKieFileSystem ( ) ; kfs . write ( ks . getResources ( ) . newClassPathResource ( "0001-input-data-string.dmn" , this . getClass ( ) ) ) ; kfs . write ( ks . g... | org . junit . Assert . assertTrue ( ( ( results . getMessages ( Level . ERROR ) . size ( ) ) > 0 ) ) |
manageDeletionProcess_OtherState ( ) { org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageDeletionProcess ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , FlowState . VSYSTEM_SCALE_UP ) ; ... | org . junit . Assert . assertNull ( newState ) |
testLL1ErrorInfo ( ) { java . lang . String grammar = "dog<sp>and<sp>software" 8 + ( ( ( ( ( ( ( ( ( ( ( ( "dog<sp>and<sp>software" 3 + "dog<sp>and<sp>software" 2 ) + "dog<sp>and<sp>software" 9 ) + "dog<sp>and<sp>software" 6 ) + "DOG<sp>:<sp>\'dog\';\n" ) + "dog<sp>and<sp>software" 1 ) + "HARDWARE:<sp>\'hardware\';\n" ... | org . junit . Assert . assertEquals ( expecting , result ) |
testParseDirectory_ok ( ) { java . io . File dir = this . folder . newFolder ( ) ; net . roboconf . core . utils . Utils . writeStringInto ( "id:<sp>tid1\nhandler:<sp>in\nname:<sp>na" , new java . io . File ( dir , "t1.properties" ) ) ; net . roboconf . core . utils . Utils . writeStringInto ( "id:<sp>tid2\nhandler:<sp... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
test22 ( ) { java . lang . System . out . println ( "validate" ) ; token . setKey ( "eyJraWQiOiJkZW1vaXNlbGxlLXNlY3VyaXR5LWp3dCIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJTVE9SRSIsImV4cCI6MTAwMTQ4MjQ5NTI3MCwiYXVkIjoid2ViIiwianRpIjoiTmxvU0NFUnktd2xXdVhtaGZhVi1IUSIsImlhdCI6MTQ4MjQ5NTI3MSwibmJmIjoxNDgyNDk1MjExLCJpZGVudGl0eSI6IjEiLCJ... | org . junit . Assert . assertEquals ( expResult , result ) |
test50 ( ) { java . lang . String code = "\n" + ( "a<sp>=<sp>msg(1,<sp>2,<sp>3,<sp>[11,<sp>22,<sp>33],<sp>3,<sp>6)<sp>\n" + "b<sp>=<sp>a[0]\n" ) ; java . lang . String expected = "0<sp>31<sp>MSTORE8<sp>224<sp>MSIZE<sp>224<sp>MSIZE<sp>MSTORE<sp>0<sp>192<sp>MSIZE<sp>ADD<sp>MSTORE8<sp>96<sp>MSIZE<sp>32<sp>ADD<sp>MSIZE<sp>... | org . junit . Assert . assertEquals ( expected , asmResult ) |
shouldStaySameWithUpdatedSet ( ) { final java . util . Set < java . lang . String > groupBys = com . google . common . collect . Sets . newHashSet ( "one" , "two" ) ; final uk . gov . gchq . gaffer . data . element . comparison . ElementJoinComparator elementJoinComparator = new uk . gov . gchq . gaffer . data . elemen... | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "one" , "two" ) , elementJoinComparator . getGroupByProperties ( ) ) |
testLijstControleEenNok ( ) { setup ( java . util . Collections . < nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst > emptyList ( ) , java . util . Collections . < nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst > emptyList ( ) , true , false , true , true , true , true , true ) ... | org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) ) |
delegateWhichCallsAnotherMockedMethod_injectableMocking ( mockit . DelegateTest$Collaborator ) { new mockit . Expectations ( ) { { mock . getValue ( ) ; result = new mockit . Delegate ( ) { int delegate ( ) { return mock . finalMethod ( ) ; } } ; mock . finalMethod ( ) ; result = 'A' ; } } ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( 'A' , mock . getValue ( ) ) |
transactionalHeapCache ( ) { "<AssertPlaceHolder>" ; } transactionalHeapCache ( ) { org . junit . Assert . assertTrue ( ( ( com . cetsoft . imcache . cache . builder . CacheBuilder . transactionalHeapCache ( ) ) instanceof com . cetsoft . imcache . cache . builder . TransactionalHeapCacheBuilder ) ) ; } | org . junit . Assert . assertTrue ( ( ( com . cetsoft . imcache . cache . builder . CacheBuilder . transactionalHeapCache ( ) ) instanceof com . cetsoft . imcache . cache . builder . TransactionalHeapCacheBuilder ) ) |
testIntersection2 ( ) { tl . lin . data . array . ArrayListOfLongs a = new tl . lin . data . array . ArrayListOfLongs ( ) ; a . add ( 5 ) ; tl . lin . data . array . ArrayListOfLongs b = new tl . lin . data . array . ArrayListOfLongs ( ) ; b . add ( 0 ) . add ( 1 ) . add ( 2 ) . add ( 3 ) ; tl . lin . data . array . Ar... | org . junit . Assert . assertTrue ( ( ( c . size ( ) ) == 0 ) ) |
testFindWithPattern ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( org . kie . workbench . common . screens . datasource . management . util . DatabaseMetadataUtil . class ) ; org . powermock . api . mockito . PowerMockito . when ( org . kie . workbench . common . screens . datasource . management ... | org . junit . Assert . assertEquals ( tables , result ) |
serializeTest ( ) { net . corpwar . lib . corpnet . util . TestSerialization testSerialization = new net . corpwar . lib . corpnet . util . TestSerialization ( ) ; byte [ ] testByte = net . corpwar . lib . corpnet . util . SerializationUtils . getInstance ( ) . serialize ( testSerialization ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertTrue ( ( ( testByte . length ) > 0 ) ) |
testGetGroupMembersEntryFaultyHttpResponse ( ) { super . setResponseResource ( new org . springframework . core . io . ByteArrayResource ( "not-even-valid-json" . getBytes ( ) ) ) ; super . setStatus ( HttpServletResponse . SC_BAD_REQUEST ) ; nl . surfnet . coin . api . client . domain . GroupMembersEntry groupMembersE... | org . junit . Assert . assertTrue ( groupMembersEntry . getEntry ( ) . isEmpty ( ) ) |
setLabels_WHEN_ExpressionMatchesPattern_AllGood ( ) { final io . prometheus . client . dropwizard . samplebuilder . MapperConfig mapperConfig = new io . prometheus . client . dropwizard . samplebuilder . MapperConfig ( ) ; final java . util . Map < java . lang . String , java . lang . String > labels = new java . util ... | org . junit . Assert . assertEquals ( labels , mapperConfig . getLabels ( ) ) |
DateWriter_datetime_local_time ( ) { java . lang . String expected = "20130611T144302" ; java . lang . String actual = biweekly . io . scribe . property . ICalPropertyScribe . date ( datetime ) . tz ( true , null ) . write ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
collapseSimilarPaths_should_merge_dissimilar_nodes ( ) { au . edu . wehi . idsv . debruijn . BasePathGraph pg = PG ( G ( 20 ) . add ( "CATTAATCGCAAGAGCGGGTTGTATTCGACGCCAAGTCAGCTGAAGCACCATTACCCGATCAAAACATATCAGAAATGATTGACGTATC" ) . add ( "CATTAATCGCAAGAGCGGGTTGTATTGGACGCCATGTCAGCTGTAGCACCATTACCCGATCAAAACATATCAGAAATGATTGA... | org . junit . Assert . assertEquals ( 1 , pg . getPathCount ( ) ) |
testGetMethod ( ) { java . lang . reflect . Method m = com . aliyun . odps . mapred . bridge . utils . MapReduceUtils . getOverriddenMethod ( WordCount . TokenizerMapper . class , "map" , long . class , com . aliyun . odps . data . Record . class , Mapper . TaskContext . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( m ) |
testIf ( ) { com . gs . collections . impl . block . function . IfFunction < java . lang . Integer , java . lang . Boolean > function = new com . gs . collections . impl . block . function . IfFunction ( com . gs . collections . impl . block . factory . Predicates . greaterThan ( 5 ) , ( java . lang . Integer ignored )... | org . junit . Assert . assertTrue ( function . valueOf ( 10 ) ) |
testEmptyFolderCommittedDeletedCommittedIgnoredComparedWithInitialCommit ( ) { org . eclipse . jgit . revwalk . RevCommit commit = createEmptyFolderAndCommit ( ) ; deleteFolderAndCommit ( ) ; recreateEmptyFolderIgnored ( ) ; org . eclipse . jgit . treewalk . TreeWalk treeWalk = createTreeWalk ( commit ) ; "<AssertPlace... | org . junit . Assert . assertFalse ( treeWalk . next ( ) ) |
testNotEquals ( ) { com . nhnent . haste . common . Version builtVersion1 = new com . nhnent . haste . common . Version . Builder ( ) . major ( com . nhnent . haste . common . VersionTest . MAJOR ) . minor ( com . nhnent . haste . common . VersionTest . MINOR ) . build ( com . nhnent . haste . common . VersionTest . BU... | org . junit . Assert . assertFalse ( builtVersion1 . equals ( builtVersion2 ) ) |
testVraagOpKandidaatVaderMetHuwelijkNaGeboorteEnVoorgGeboorte ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView moeder = bouwMoeder ( 20050505 , 20111111 , NationaliteitcodeAttribuut . NL_NATIONALITEIT_CODE_STRING , 20120505 , 20140611 , NationaliteitcodeAttribuut . NL_NATIONALITEIT_COD... | org . junit . Assert . assertEquals ( 1 , kandidaten . size ( ) ) |
itShouldRemoveLeadingNonNumericCharacters ( ) { java . lang . String inputValue = "+$42" ; java . lang . String actual = hydrograph . engine . transformation . standardfunctions . NumericFunctions . decimalStrip ( inputValue ) ; java . lang . String expected = "42" ; "<AssertPlaceHolder>" ; } decimalStrip ( T ) { if ( ... | org . junit . Assert . assertEquals ( expected , actual ) |
testEpicIssue ( ) { org . gitlab4j . api . models . EpicIssue epicIssue = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . EpicIssue . class , "epic-issue.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java ... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( epicIssue , "epic-issue.json" ) ) |
testGetSchemaBadTableNotExecuted ( ) { org . talend . components . snowflake . tsnowflakeoutput . TSnowflakeOutputProperties outputProps = ( ( org . talend . components . snowflake . tsnowflakeoutput . TSnowflakeOutputProperties ) ( getComponentService ( ) . getComponentProperties ( TSnowflakeOutputDefinition . COMPONE... | org . junit . Assert . assertEquals ( ValidationResult . Result . OK , tableProps . getValidationResult ( ) . getStatus ( ) ) |
testAddExecution ( ) { il . co . topq . report . business . execution . ExecutionMetadata metaData = il . co . topq . report . business . elastic . ExecutionMetaDataGenerator . generateExecutionMetadata ( 1 , 2 , 10 ) ; il . co . topq . report . events . ExecutionEndedEvent event = new il . co . topq . report . events ... | org . junit . Assert . assertEquals ( 20 , storedTests . size ( ) ) |
testGetRuntimePathNoDuplicates ( ) { final org . oscm . build . ant . PathBuilderTest . ProjectStub projectA = new org . oscm . build . ant . PathBuilderTest . ProjectStub ( "project-a" ) ; projectA . addLibraries ( org . oscm . build . ant . PathBuilderTest . LIB ) ; final org . oscm . build . ant . PathBuilderTest . ... | org . junit . Assert . assertEquals ( expected , java . util . Arrays . asList ( path . list ( ) ) ) |
testPartialLongKeyMatch ( ) { int ages = 10 ; int records = 20 ; com . oberasoftware . jasdb . core . collections . OrderedBalancedTree < com . oberasoftware . jasdb . api . index . keys . Key , com . oberasoftware . jasdb . api . index . keys . Key > balancedTree = createTree ( ages , records ) ; for ( int i = 0 ; i <... | org . junit . Assert . assertEquals ( records , range . size ( ) ) |
testMemPipelineWithReflectionRecord ( ) { java . lang . String writeRecord = "John<sp>Doe" ; final org . apache . crunch . PCollection < java . lang . String > writeCollection = org . apache . crunch . impl . mem . MemPipeline . typedCollectionOf ( org . apache . crunch . types . avro . Avros . strings ( ) , writeRecor... | org . junit . Assert . assertEquals ( writeRecord , readRecord . toString ( ) ) |
whenMatchingLetterOrString_ShouldReturnTrueForCorrectString ( ) { java . lang . String inputString = "someString789" ; boolean result = com . google . common . base . CharMatcher . javaLetterOrDigit ( ) . matchesAllOf ( inputString ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( result ) |
testMatchCertificateAndSelectionAttributes ( ) { com . intel . mtwilson . tag . model . X509AttributeCertificate certificate = createCertificate ( ) ; com . intel . mtwilson . tag . selection . xml . SelectionType sameSelection = createSelectionSame ( ) ; com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCer... | org . junit . Assert . assertTrue ( provisioner . certificateAttributesEqual ( certificate , sameSelection ) ) |
testGetInstanceString ( ) { org . joda . time . DateTimeZone instance = org . apache . phoenix . cache . JodaTimezoneCache . getInstance ( "America/St_Vincent" ) ; "<AssertPlaceHolder>" ; } getInstance ( java . nio . ByteBuffer ) { try { return org . apache . phoenix . cache . JodaTimezoneCache . cachedJodaTimeZones . ... | org . junit . Assert . assertNotNull ( instance ) |
testCalculateBoundsSpatialFilter ( ) { final java . lang . String typeName = org . geotools . arcsde . data . ArcSDEJavaApiTest . testData . getTempTableName ( ) ; java . lang . String [ ] cols = new java . lang . String [ ] { "SHAPE" } ; final com . esri . sde . sdk . client . SeFilter [ ] spatFilters ; try { com . es... | org . junit . Assert . assertNotNull ( extent ) |
testComponentParametersScript ( ) { java . io . Reader script = new java . io . StringReader ( ( "" + ( ( ( ( ( ( "package<sp>com.picocontainer.script.groovy\n" + "import<sp>com.picocontainer.parameters.ComponentParameter\n" ) + "import<sp>com.picocontainer.script.testmodel.*\n" ) + "scripted<sp>=<sp>builder.container<... | org . junit . Assert . assertSame ( a , b . a ) |
testGetLargeScriptStmtCount ( ) { classUnderTest . setLargeScriptStmtCount ( 10 ) ; "<AssertPlaceHolder>" ; } getLargeScriptStmtCount ( ) { return _largeScriptStmtCount ; } | org . junit . Assert . assertEquals ( 10 , classUnderTest . getLargeScriptStmtCount ( ) ) |
testCombinedSpanInMultipleFieldsQuery ( ) { java . lang . String query = "lin<sp>clooney" ; java . util . ArrayList < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( TestConstants . FIRST_NAME ) ; attributeNames . add ( TestConstants . LAST_NAME ) ; attributeNames . add ... | org . junit . Assert . assertTrue ( contains ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . tools . service . builder . test . model . VersionedEntry > versionedEntries = _... | org . junit . Assert . assertTrue ( versionedEntries . isEmpty ( ) ) |
testSplitMerge64 ( ) { java . util . Random rnd = new java . util . Random ( ) ; for ( int i = 0 ; i < ( ch . ethz . globis . phtree . bits . TestBitsToolsSplitMergeVarLong . MUL ) ; i ++ ) { long [ ] l = new long [ ] { rnd . nextLong ( ) , rnd . nextLong ( ) } ; long [ ] x = ch . ethz . globis . phtree . util . BitToo... | org . junit . Assert . assertArrayEquals ( l , l2 ) |
testFiltersEnableCache ( ) { p . setFilters ( mock ( java . awt . image . BufferedImageOp . class ) ) ; "<AssertPlaceHolder>" ; } shouldUseCache ( ) { return super . shouldUseCache ( ) ; } | org . junit . Assert . assertThat ( p . shouldUseCache ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
getInstanceFromClass ( ) { for ( int i = 1 ; i < 5 ; i ++ ) { final org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo pojo = ( ( org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo ) ( org . apache . openejb . server . groovy . BeanManagerHelperTest . helper . beanFromClass ( "... | org . junit . Assert . assertEquals ( ( 5 + i ) , pojo . id ) |
testValidateUrl_LocalSystem8080 ( ) { boolean result = org . oscm . validator . ADMValidator . isUrl ( "http://localsystem:8080" ) ; "<AssertPlaceHolder>" ; } isUrl ( java . lang . String ) { return org . oscm . validator . ADMValidator . URL_VALIDATOR . isValid ( value ) ; } | org . junit . Assert . assertTrue ( result ) |
testDoesNotMatchWhenAnnotatedForCommandMessage ( ) { org . axonframework . messaging . annotation . ParameterResolver resolver = testSubject . createInstance ( sourceIdMethod , sourceIdMethod . getParameters ( ) , 0 ) ; org . axonframework . commandhandling . CommandMessage < java . lang . Object > commandMessage = org... | org . junit . Assert . assertFalse ( resolver . matches ( commandMessage ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.