input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testAllAggregateOpsAreSerializable ( ) { org . datavec . api . transform . ops . Set < java . lang . String > allTypes = new org . datavec . api . transform . ops . HashSet ( ) ; allTypes . add ( "org.datavec.api.transform.ops.AggregatorImpls$AggregableCount" 4 ) ; allTypes . add ( "org.datavec.api.transform.ops.Aggreg... | org . junit . Assert . assertTrue ( ( op + "org.datavec.api.transform.ops.StringWritableOp" 0 ) , implementsSerializable ( cls ) ) |
genericTestCse ( ) { java . util . function . Supplier < java . lang . Boolean > result = ( ) -> { org . openqa . selenium . support . PageFactory . initElements ( new io . appium . java_client . pagefactory . AppiumFieldDecorator ( new io . appium . java_client . pagefactory_tests . MockWebDriver ( ) ) , new io . appi... | org . junit . Assert . assertTrue ( result . get ( ) ) |
getPatients_shouldNotGetPatientByNonexistingSingleShortName_SignatureNo1 ( ) { java . util . List < org . openmrs . Patient > patients = dao . getPatients ( "xy" , 0 , 11 ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util... | org . junit . Assert . assertEquals ( 0 , patients . size ( ) ) |
testMode ( ) { logger . info ( "mode" ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection flatDataCollection = generateFlatDataCollection ( ) ; flatDataCollection . add ( 4.65 ) ; flatDataCollection . add ( 4.65 ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection expResult ... | org . junit . Assert . assertEquals ( expResult , result ) |
readWriteStreamMemoryTweets ( ) { java . io . InputStream stream = org . openimaj . twitter . USMFStatus . class . getResourceAsStream ( "/org/openimaj/twitter/tweets.txt" ) ; org . openimaj . twitter . collection . TwitterStatusList < org . openimaj . twitter . USMFStatus > status = org . openimaj . twitter . collecti... | org . junit . Assert . assertTrue ( memoryLoaded . equals ( readStatus ) ) |
shouldOnlyValidateStrings ( ) { boolean valid = validator . isValid ( "34608514300" , context ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . Object , javax . validation . ConstraintValidatorContext ) { java . lang . Class < ? extends java . lang . Object > type = toValidate . getClass ( ) ; if ( ! ( hasChoiceIte... | org . junit . Assert . assertTrue ( valid ) |
getNameIdentifierFromMetadata ( ) { when ( adapter . getNameField ( definition ) ) . thenReturn ( java . util . Optional . empty ( ) ) ; when ( adapter . getMetaProperty ( PropertyMetaTypes . NAME , definition ) ) . thenReturn ( nameProperty ) ; when ( propertyAdapter . getId ( nameProperty ) ) . thenReturn ( org . kie... | org . junit . Assert . assertEquals ( nameIdentifier , org . kie . workbench . common . stunner . core . util . DefinitionUtilsTest . METADATA_FIELD ) |
testSetAndGetId ( ) { this . roleAssignment = new edu . harvard . iq . dataverse . RoleAssignment ( this . dataverseRole , this . roleAssignee , this . dataset , this . privateUrlToken ) ; java . lang . Long id = 12345L ; this . roleAssignment . setId ( id ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( id , this . roleAssignment . getId ( ) ) |
getRoot ( ) { java . nio . file . Path rootPath = java . nio . file . Paths . get ( hdfs . jsr203 . TestPath . clusterUri ) ; java . nio . file . Path p = rootPath . resolve ( "tmp/testNormalize/test" ) ; "<AssertPlaceHolder>" ; } getRoot ( ) { if ( this . isAbsolute ( ) ) return new hdfs . jsr203 . HadoopPath ( this .... | org . junit . Assert . assertEquals ( rootPath , p . getRoot ( ) ) |
listTest1 ( ) { int agTest1 = agTest . listTest1 ( ) ; "<AssertPlaceHolder>" ; } listTest1 ( ) { return 1 ; } | org . junit . Assert . assertTrue ( ( agTest1 == 2 ) ) |
testNextUniformExclusiveEndpoints ( ) { for ( int i = 0 ; i < 1000 ; i ++ ) { double u = randomData . nextUniform ( 0.99 , 1 ) ; "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertTrue ( ( ( u > 0.99 ) && ( u < 1 ) ) ) |
testMethodInjectionWithMapAndNoMatches ( ) { org . springframework . ide . eclipse . beans . core . internal . model . BeansConfig config = new org . springframework . ide . eclipse . beans . core . internal . model . BeansConfig ( beansProject , "src/org/springframework/beans/factory/annotation/testMethodInjectionWith... | org . junit . Assert . assertEquals ( 0 , references . size ( ) ) |
environmentsShouldBeReturnedWhenDefaultEnvironmentHasProjectScope ( ) { when ( currentProject . getRunner ( ) ) . thenReturn ( ( ( org . eclipse . che . ide . ext . runner . client . util . GetEnvironmentsUtil . DEFAULT_RUNNER_PROJECT_TYPE ) + "text1/text2/text" ) ) ; when ( tree . getNode ( "text1" ) ) . thenReturn ( ... | org . junit . Assert . assertThat ( environments . size ( ) , org . hamcrest . core . Is . is ( 2 ) ) |
runTest ( ) { final java . lang . String testText = slurp ( ( ( ( ( dir ) + ( java . io . File . separator ) ) + ( test ) ) + ".text" ) ) ; final java . lang . String htmlText = slurp ( ( ( ( ( dir ) + ( java . io . File . separator ) ) + ( test ) ) + ".html" ) ) ; if ( testText . startsWith ( "IGNORED:" ) ) { System .... | org . junit . Assert . assertEquals ( test , htmlText . trim ( ) , markdownText . trim ( ) ) |
testListSubscriptions1 ( ) { when ( _local . listSubscriptions ( isSubject ( ) , isNull ( java . lang . String . class ) , eq ( Long . MAX_VALUE ) ) ) . thenReturn ( com . google . common . collect . Iterators . < com . bazaarvoice . emodb . databus . api . Subscription > emptyIterator ( ) ) ; java . util . Iterator < ... | org . junit . Assert . assertFalse ( actual . hasNext ( ) ) |
testOnConnectionChangedAddedPre_Original ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
testVoerRegelUitLandMigratieIsNietNederlandEnPersoonHeeftBVP ( ) { nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoon = maakPersoon ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . migratie . BRBY0540Test . HEEFT_BVP ) ; nl . bzk . brp . model . bericht ... | org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) ) |
failedPreloadHandledGracefully ( ) { org . apache . shindig . gadgets . preload . PreloadedData preloadedData = new org . apache . shindig . gadgets . preload . PreloadedData ( ) { public java . util . Collection < java . lang . Object > toJson ( ) throws org . apache . shindig . gadgets . preload . PreloadException { ... | org . junit . Assert . assertEquals ( 0 , json . length ( ) ) |
setRecurrencyKind_recurrencyKindType_recurrencyKindIsSet ( ) { eu . chargetime . ocpp . model . core . RecurrencyKindType recurrencyKindType = eu . chargetime . ocpp . model . core . RecurrencyKindType . Daily ; chargingProfile . setRecurrencyKind ( recurrencyKindType ) ; "<AssertPlaceHolder>" ; } getRecurrencyKind ( )... | org . junit . Assert . assertThat ( chargingProfile . getRecurrencyKind ( ) , org . hamcrest . CoreMatchers . equalTo ( recurrencyKindType ) ) |
testDoNotRefineOtherContext ( ) { org . sonatype . aether . graph . DependencyNode node = parser . parseLiteral ( "gid:aid:ext:cls:ver" ) ; node . setRequestContext ( "otherContext" ) ; org . sonatype . aether . graph . DependencyNode refinedNode = refiner . transformGraph ( node , context ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( node , refinedNode ) |
testGetResourceAsStream ( ) { org . eclipse . rap . rwt . internal . theme . CssCursor image = org . eclipse . rap . rwt . internal . theme . CssCursor . valueOf ( Fixture . IMAGE_50x100 , org . eclipse . rap . rwt . internal . theme . ThemeTestUtil . RESOURCE_LOADER ) ; java . io . InputStream inputStream = image . ge... | org . junit . Assert . assertTrue ( ( ( inputStream . available ( ) ) > 0 ) ) |
testComposite ( ) { org . apache . activemq . command . ActiveMQDestination q1 = new org . apache . activemq . command . ActiveMQQueue ( "queue1,topic://topic1" ) ; java . util . Set < org . apache . activemq . jaas . GroupPrincipal > aclsq1 = org . apache . activemq . security . LDAPAuthorizationMapTest . authMap . ge... | org . junit . Assert . assertEquals ( 0 , aclsq1 . size ( ) ) |
getMonthReservationsOfUser ( ) { final org . silverpeas . resourcesmanager . web . ReservationEntity [ ] entities = getAt ( ( ( aMonthReservationResourceBaseURI ( ) ) + "/month/2013/02/14/user/10" ) , org . silverpeas . resourcesmanager . web . ReservationEntity [ ] . class ) ; "<AssertPlaceHolder>" ; } aMonthReservati... | org . junit . Assert . assertNotNull ( entities ) |
testSetProperty ( ) { getRestGraphDb ( ) . getReferenceNode ( ) . setProperty ( "name" , "test" ) ; org . neo4j . graphdb . Node node = getRestGraphDb ( ) . getReferenceNode ( ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { java . lang . Object value = getPropertyValue ( key ) ; if ( value == null ... | org . junit . Assert . assertEquals ( "test" , node . getProperty ( "name" ) ) |
shouldResolveTextIndexLanguageOverrideCorrectly ( ) { java . util . List < org . springframework . data . mongodb . core . index . MongoPersistentEntityIndexResolver . IndexDefinitionHolder > indexDefinitions = org . springframework . data . mongodb . core . index . MongoPersistentEntityIndexResolverUnitTests . prepare... | org . junit . Assert . assertThat ( indexDefinitions . get ( 0 ) . getIndexOptions ( ) . get ( "language_override" ) , is ( ( ( java . lang . Object ) ( "lang" ) ) ) ) |
testReportForFileSizeGroupByUpperCaseOfFileExtensionWithFilter ( ) { reportData = reportDao . getReportData ( filter , ReportFieldEnum . FILE_SIZE , getGroupByFieldList ( ReportFieldEnum . FILE_EXTENSION , "upper" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertTrue ( ( ( reportData . size ( ) ) > 0 ) ) |
testNoExpirationWithNoExpiredToken ( ) { final org . pac4j . jwt . profile . JwtGenerator jwtGenerator = new org . pac4j . jwt . profile . JwtGenerator < org . pac4j . oidc . profile . OidcProfile > ( ) ; final java . time . ZonedDateTime expAfter = java . time . LocalDateTime . from ( java . time . LocalDateTime . now... | org . junit . Assert . assertFalse ( profile . isExpired ( ) ) |
testMatch06 ( ) { boolean matchResult = namespacePatternMatcher . matchesEndToEnd ( "69A" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertTrue ( matchResult ) |
testMaxWithLargeIntegers ( ) { final org . jsoar . kernel . rhs . functions . Max max = new org . jsoar . kernel . rhs . functions . Max ( ) ; final org . jsoar . kernel . symbols . Symbol result = max . execute ( rhsFuncContext , org . jsoar . kernel . symbols . Symbols . asList ( syms , 2 , 1000000000000L , ( - 40 ) ... | org . junit . Assert . assertEquals ( 1000000000000L , result . asInteger ( ) . getValue ( ) ) |
testGetValueWithoutValueAccessor ( ) { org . mockito . Mockito . when ( _ddmFormFieldTypeServicesTracker . getDDMFormFieldValueAccessor ( org . mockito . Matchers . anyString ( ) ) ) . thenReturn ( null ) ; _ddmFormContextToDDMForm . ddmFormFieldTypeServicesTracker = _ddmFormFieldTypeServicesTracker ; java . lang . Obj... | org . junit . Assert . assertEquals ( "false" , result ) |
testHistoryTimeToLiveNull ( ) { org . camunda . bpm . engine . impl . cmmn . entity . repository . CaseDefinitionEntity activity = ( ( org . camunda . bpm . engine . impl . cmmn . entity . repository . CaseDefinitionEntity ) ( handler . handleElement ( caseDefinition , context ) ) ) ; "<AssertPlaceHolder>" ; } getHisto... | org . junit . Assert . assertNull ( activity . getHistoryTimeToLive ( ) ) |
testSed_searchAndReplaceUsingPipeDelimiterAndEscapedPipe ( ) { final java . lang . String input = "to<sp>be|not<sp>to<sp>be<sp>that<sp>is<sp>the<sp>question" ; final java . lang . String script = "s|be\\|not|be<sp>or<sp>not|g" ; final java . lang . String expectedOutput = "to<sp>be<sp>or<sp>not<sp>to<sp>be<sp>that<sp>i... | org . junit . Assert . assertEquals ( expectedOutput , output ) |
normalizeNelimArg ( ) { org . arend . core . context . param . DependentLink var0 = param ( "var0" , Universe ( 0 ) ) ; org . arend . core . context . param . SingleDependentLink x = singleParam ( "x" , Nat ( ) ) ; org . arend . term . expr . visitor . Expression arg = Apps ( Lam ( x , Ref ( x ) ) , Zero ( ) ) ; org . ... | org . junit . Assert . assertEquals ( Suc ( Zero ( ) ) , result ) |
check_for_no_filter_control ( ) { browser . get ( contextPath . toExternalForm ( ) ) ; java . util . List < org . openqa . selenium . WebElement > filterInputs = browser . findElements ( org . openqa . selenium . By . cssSelector ( ".rf-edt-flt-i" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return getItems ( ) . size ( ... | org . junit . Assert . assertEquals ( 0 , filterInputs . size ( ) ) |
testExecution ( ) { java . util . List < java . lang . Integer > inputData = java . util . Arrays . asList ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ) ; org . qcri . rheem . spark . operators . SparkBernoulliSampleOperator < java . lang . Integer > sampleOperator = new org . qcri . rheem . spark . operators . SparkBerno... | org . junit . Assert . assertEquals ( 5 , result . size ( ) ) |
testGetActiveBlocks ( ) { org . onebusaway . admin . service . api . VehicleAssignmentResource var = new org . onebusaway . admin . service . api . VehicleAssignmentResource ( ) ; org . onebusaway . admin . service . impl . VehicleAssignmentServiceImpl vas = new org . onebusaway . admin . service . impl . VehicleAssign... | org . junit . Assert . assertNotNull ( beans ) |
getConceptsWithDrugsInFormulary_shouldGiveAListOfAllMatchingConcepts ( ) { int matchingConcepts = 2 ; java . util . List < org . openmrs . Concept > concepts = conceptService . getConceptsWithDrugsInFormulary ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . g... | org . junit . Assert . assertEquals ( matchingConcepts , concepts . size ( ) ) |
test_Initial_Set ( ) { org . cache2k . Cache < java . lang . Integer , java . lang . Integer > c = target . cache ( ) ; org . cache2k . processor . EntryProcessor p = new org . cache2k . processor . EntryProcessor ( ) { @ org . cache2k . test . core . Override public java . lang . Object process ( org . cache2k . proce... | org . junit . Assert . assertEquals ( "abc" , _result ) |
testPathExistWhenPathIsDirectory ( ) { mFileSystem . createDirectory ( new alluxio . AlluxioURI ( "/testDir" ) ) ; int ret = mFsShell . run ( "test" , "-e" , "/testDir" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . job . JobConfig , int , alluxio . conf . AlluxioConfiguration ) { alluxio . retry . CountingRetry retryPo... | org . junit . Assert . assertEquals ( 0 , ret ) |
shouldReturnWhetherOrNotRequestIsSecureFromUnderlyingRequest ( ) { boolean expectedSecureStatus = true ; when ( mockHttpRequest . isSecure ( ) ) . thenReturn ( expectedSecureStatus ) ; ro . pippo . pac4j . PippoWebContext context = makePippoWebContext ( ) ; "<AssertPlaceHolder>" ; verify ( mockHttpRequest , times ( 1 )... | org . junit . Assert . assertThat ( context . isSecure ( ) , org . hamcrest . core . Is . is ( expectedSecureStatus ) ) |
testClosed ( ) { java . util . Optional < java . lang . Boolean > actual = org . openhab . io . transport . modbus . ModbusBitUtilities . translateCommand2Boolean ( OpenClosedType . CLOSED ) ; "<AssertPlaceHolder>" ; } is ( org . eclipse . smarthome . core . thing . ThingTypeUID ) { return thingTypeUID . equals ( other... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( java . util . Optional . of ( false ) ) ) ) |
testRead_oracle2 ( ) { final java . io . File file = util . getFileByClassPath ( "/oracle2.sql" ) ; final java . io . InputStream in = new java . io . FileInputStream ( file ) ; final java . lang . String sqlContent = util . read ( in ) ; final java . util . List < java . lang . String > lines = getSqlQuery . getSqlQue... | org . junit . Assert . assertEquals ( 3 , lines . size ( ) ) |
testEmptyDifferentOp ( ) { edu . uci . ics . texera . dataflow . regexmatcher . GramBooleanQuery query1 = new edu . uci . ics . texera . dataflow . regexmatcher . GramBooleanQuery ( GramBooleanQuery . QueryOp . AND ) ; edu . uci . ics . texera . dataflow . regexmatcher . GramBooleanQuery query2 = new edu . uci . ics . ... | org . junit . Assert . assertFalse ( query1 . equals ( query2 ) ) |
clientRequestTrailingHeaders ( ) { boostrapEnv ( 1 , 1 , 1 ) ; final java . lang . String text = "some<sp>data" ; final io . netty . buffer . ByteBuf content = io . netty . buffer . Unpooled . copiedBuffer ( text . getBytes ( ) ) ; final io . netty . handler . codec . http . FullHttpRequest request = new io . netty . h... | org . junit . Assert . assertEquals ( request , capturedRequests . get ( 0 ) ) |
mockType ( ) { java . lang . Object mock = org . powermock . api . easymock . PowerMock . createMock ( getClass ( ) ) ; "<AssertPlaceHolder>" ; } getMockedClass ( T ) { if ( possibleMock == null ) { return null ; } if ( java . lang . reflect . Proxy . isProxyClass ( possibleMock . getClass ( ) ) ) { if ( ! ( ( java . l... | org . junit . Assert . assertEquals ( getClass ( ) , org . easymock . EasyMockSupport . getMockedClass ( mock ) ) |
doesNotTracksNonDisposableOverriddenObjects ( ) { final org . slf4j . Logger log = mock ( org . slf4j . Logger . class ) ; final org . mule . runtime . core . internal . registry . map . RegistryMap registryMap = new org . mule . runtime . core . internal . registry . map . RegistryMap ( log ) ; java . lang . Object va... | org . junit . Assert . assertThat ( registryMap . getLostObjects ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . empty ( ) ) ) |
shouldUseOriginalTypeWhenSettingEmptyArrayIfEntityAlreadyHasACollection ( ) { org . neo4j . graphdb . Node node = org . neo4j . server . rest . domain . PropertySettingStrategyTest . db . createNode ( ) ; node . setProperty ( "arr" , new java . lang . String [ ] { "a" , "b" } ) ; org . neo4j . server . rest . domain . ... | org . junit . Assert . assertThat ( node . getProperty ( "arr" ) , org . hamcrest . Matchers . is ( new java . lang . String [ ] { } ) ) |
shouldCorrectlyDetectSupportOfDeepNestedProcessor ( ) { victim = new ro . isdc . wro . model . resource . processor . decorator . SupportAwareProcessorDecorator ( new ro . isdc . wro . model . resource . processor . decorator . ProcessorDecorator ( new ro . isdc . wro . model . resource . processor . decorator . Proces... | org . junit . Assert . assertTrue ( victim . isSupported ( ) ) |
testPreimageAndProof_WithArity ( ) { ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarMod G_q = this . G_q2 ; ch . bfh . unicrypt . math . algebra . dualistic . classes . ZMod Z_q = this . G_q2 . getZModOrder ( ) ; ch . bfh . unicrypt . math . function . interfaces . Function f1 = ch . bfh . unicr... | org . junit . Assert . assertTrue ( v ) |
batchExists ( ) { com . aerospike . client . Key [ ] keys = new com . aerospike . client . Key [ com . aerospike . test . sync . basic . TestBatch . size ] ; for ( int i = 0 ; i < ( com . aerospike . test . sync . basic . TestBatch . size ) ; i ++ ) { keys [ i ] = new com . aerospike . client . Key ( args . namespace ,... | org . junit . Assert . assertEquals ( com . aerospike . test . sync . basic . TestBatch . size , existsArray . length ) |
countUserFacilityQuotas ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . ModulesUtilsEntryIntegrationTest . CLASS_NAME ) + "countUserFacilityQuotas" ) ) ; cz . metacentrum . perun . core . api . Resource resource = new cz . metacentrum . perun . core . api . Resource ( 10 , "test" , "test" ,... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testVectorBinarizerDense ( ) { org . apache . spark . api . java . JavaRDD < org . apache . spark . sql . Row > jrdd = sc . parallelize ( java . util . Arrays . asList ( org . apache . spark . sql . RowFactory . create ( 0.0 , 1.0 , new org . apache . spark . mllib . linalg . DenseVector ( new double [ ] { - 2.0 , - 3.... | org . junit . Assert . assertArrayEquals ( output , ( ( org . apache . spark . mllib . linalg . DenseVector ) ( row . get ( 3 ) ) ) . toArray ( ) , 0.0 ) |
testUndoEmptyJournal ( ) { int iterations = 0 ; for ( journal . io . api . Location loc : journal . undo ( ) ) { iterations ++ ; } "<AssertPlaceHolder>" ; } undo ( ) { return new journal . io . api . Journal . Undo ( redo ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , iterations ) |
testAddDropletsToLoadBalancer ( ) { com . myjeeva . digitalocean . pojo . Response result = apiClient . addDropletsToLoadBalancer ( loadBalancerIdForInfo , java . util . Arrays . asList ( dropletIdForInfo ) ) ; "<AssertPlaceHolder>" ; } addDropletsToLoadBalancer ( java . lang . String , java . util . List ) { validateL... | org . junit . Assert . assertNotNull ( result ) |
whenGettingEntriesByTitleButNothingMatchesShouldReturnNull ( ) { java . io . FileInputStream file = new java . io . FileInputStream ( de . slackspace . openkeepass . util . ResourceUtils . getResource ( "testDatabase.kdbx" ) ) ; de . slackspace . openkeepass . KeePassDatabase reader = de . slackspace . openkeepass . Ke... | org . junit . Assert . assertNull ( entry ) |
testMoveAxisDown ( ) { net . imglib2 . RandomAccessible < net . imglib2 . Localizable > input = net . imglib2 . util . Localizables . randomAccessible ( 4 ) ; net . imglib2 . RandomAccessible < net . imglib2 . Localizable > view = net . imglib2 . view . Views . moveAxis ( input , 3 , 1 ) ; net . imglib2 . RandomAccess ... | org . junit . Assert . assertArrayEquals ( new long [ ] { 1 , 2 , 3 , 4 } , net . imglib2 . util . Localizables . asLongArray ( ra . get ( ) ) ) |
testCreateValue_null ( ) { "<AssertPlaceHolder>" ; } createValue ( java . lang . Object ) { if ( value instanceof com . google . api . ads . admanager . axis . v201805 . Value ) { return ( ( com . google . api . ads . admanager . axis . v201805 . Value ) ( value ) ) ; } else if ( value == null ) { return new com . goog... | org . junit . Assert . assertEquals ( null , ( ( com . google . api . ads . admanager . axis . v201805 . TextValue ) ( com . google . api . ads . admanager . axis . utils . v201805 . Pql . createValue ( null ) ) ) . getValue ( ) ) |
testComputeVec4FromStringWithInvalidString ( ) { java . lang . String vectorString = "(1,<sp>a,<sp>3)" ; gov . nasa . worldwind . geom . Vec4 result = au . gov . ga . earthsci . worldwind . common . util . Util . computeVec4FromString ( vectorString ) ; "<AssertPlaceHolder>" ; } computeVec4FromString ( java . lang . St... | org . junit . Assert . assertNull ( result ) |
testBackendDeleteMetadataRecord ( ) { org . apache . jackrabbit . oak . plugins . blob . SharedDataStore fds = dataStore ; fds . addMetadataRecord ( org . apache . jackrabbit . oak . plugins . blob . datastore . DataStoreUtils . randomStream ( 0 , 10 ) , "name" ) ; for ( java . lang . String name : com . google . commo... | org . junit . Assert . assertTrue ( fds . deleteMetadataRecord ( "name" ) ) |
UmlLinkType_InstanceVariableDeclaration_Composite_Array ( ) { java . lang . String fromClass = "domain.direct.violating.DeclarationVariableInstance_GenericType_OneTypeParameter" ; java . lang . String toClass = "technology.direct.dao.AccountDAO" ; java . lang . String fromAttribute = "aDao" ; boolean isComposite = true... | org . junit . Assert . assertTrue ( isUmlLinkDetectedViaClass ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) ) |
testGroupSystemHookEvent ( ) { org . gitlab4j . api . systemhooks . SystemHookEvent event = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . systemhooks . SystemHookEvent . class , "group-system-hook-event.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java .... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( event , "group-system-hook-event.json" ) ) |
testAdd ( ) { cz . seznam . euphoria . core . executor . graph . DAG < java . lang . Integer > dag = cz . seznam . euphoria . core . executor . graph . DAG . of ( 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return operators . size ( ) ; } | org . junit . Assert . assertEquals ( dag . size ( ) , 1 ) |
shouldAcceptWhenLessThan ( ) { final uk . gov . gchq . gaffer . sketches . clearspring . cardinality . predicate . HyperLogLogPlusIsLessThan filter = new uk . gov . gchq . gaffer . sketches . clearspring . cardinality . predicate . HyperLogLogPlusIsLessThan ( 15 ) ; boolean accepted = filter . test ( uk . gov . gchq . ... | org . junit . Assert . assertTrue ( accepted ) |
testSearchByName ( ) { addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , "Contact" ) ; addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , "Event" ) ; java . util . List < com . li... | org . junit . Assert . assertEquals ( "Contact" , getStructureName ( structures . get ( 0 ) ) ) |
test2 ( ) { try { org . apache . lucene . analysis . Analyzer analyzer = new org . apdplat . word . lucene . ChineseWordAnalyzer ( ) ; org . apache . lucene . analysis . TokenStream tokenStream = analyzer . tokenStream ( "text" , "" ) ; java . util . List < java . lang . String > words = new java . util . ArrayList ( )... | org . junit . Assert . assertEquals ( expResult , words . toString ( ) ) |
hashCode_equals ( ) { com . google . auth . ServiceAccountSigner . SigningException signingException = new com . google . auth . ServiceAccountSigner . SigningException ( com . google . auth . SigningExceptionTest . EXPECTED_MESSAGE , com . google . auth . SigningExceptionTest . EXPECTED_CAUSE ) ; com . google . auth .... | org . junit . Assert . assertEquals ( signingException . hashCode ( ) , otherSigningException . hashCode ( ) ) |
testCreateAdsServiceClient ( ) { when ( soapClientHandler . createSoapClient ( adsServiceDescriptor ) ) . thenReturn ( soapClient ) ; when ( adsServiceClientFactory . create ( soapClient , adsServiceDescriptor , adsSession ) ) . thenReturn ( adsServiceClient ) ; com . google . api . ads . common . lib . client . AdsSer... | org . junit . Assert . assertSame ( adsServiceClient , testAdsServiceClient ) |
testTwoQueries ( ) { edu . uci . jforests . util . concurrency . BlockingThreadPoolExecutor . init ( 1 ) ; edu . uci . jforests . eval . ranking . RankingEvaluationMetric eval = new edu . uci . jforests . eval . ranking . URiskAwareEval ( new edu . uci . jforests . eval . ranking . NDCGEval ( 2 , 2 ) , 1 ) ; edu . uci ... | org . junit . Assert . assertTrue ( true ) |
testValueOf2 ( ) { eu . bitwalker . useragentutils . UserAgent userAgent = eu . bitwalker . useragentutils . UserAgent . parseUserAgentString ( "Mozilla/4.0<sp>(compatible;<sp>MSIE<sp>6.0;<sp>Windows<sp>NT<sp>5.2;<sp>SV1;<sp>.NET<sp>CLR<sp>1.1.4322;<sp>.NET<sp>CLR<sp>2.0.50727)" ) ; eu . bitwalker . useragentutils . Us... | org . junit . Assert . assertEquals ( userAgent , retrievedUserAgent ) |
testGetUserId2 ( ) { com . liferay . portal . kernel . model . PortletInstance portletInstance = com . liferay . portal . kernel . model . PortletInstance . fromPortletInstanceKey ( getPortletInstanceKey ( PortletKeys . TEST , "1234" ) ) ; "<AssertPlaceHolder>" ; } getUserId ( ) { return _userId ; } | org . junit . Assert . assertEquals ( 0 , portletInstance . getUserId ( ) ) |
testGetUserId4 ( ) { com . liferay . portal . kernel . model . PortletInstance portletInstance = com . liferay . portal . kernel . model . PortletInstance . fromPortletInstanceKey ( getPortletInstanceKey ( PortletKeys . TEST , 1234 , "5678" ) ) ; "<AssertPlaceHolder>" ; } getUserId ( ) { return _userId ; } | org . junit . Assert . assertEquals ( 1234 , portletInstance . getUserId ( ) ) |
testNotMatchedObjectIdFilter ( ) { connection = createConnection ( TestConfig . serverEndpoint , TestConfig . port ) ; connection . connect ( ) ; connection . login ( "userc" , "1" , "voxeo" ) ; com . voxeo . rayo . client . xmpp . stanza . IQ iq = new com . voxeo . rayo . client . xmpp . stanza . IQ ( IQ . Type . set ... | org . junit . Assert . assertNull ( filter . poll ( ) ) |
testRestrictSortedColumns ( ) { java . sql . PreparedStatement ps = methodWatcher . prepareStatement ( ( "%" 9 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "%" 2 + "%" 1 ) + "c.columnname<sp>as<sp>column_name," ) + "c.columnnumber<sp>as<sp>ordinal_position<sp>" ) + "%" 8 ) + "and<sp>((1=1)<sp>or<sp>'%'<sp>is<sp>not<sp>null)" ... | org . junit . Assert . assertTrue ( "and<sp>((1=1)<sp>or<sp>'%'<sp>is<sp>not<sp>null)" 2 , ( ( rows . size ( ) ) > 0 ) ) |
generateStringConcat_single ( ) { java . lang . String [ ] vals = new java . lang . String [ ] { "'string'" } ; java . lang . String expected = "CONCAT('string')" ; org . pentaho . pms . mql . dialect . HiveDialect dialect = new org . pentaho . pms . mql . dialect . HiveDialect ( ) ; java . lang . String result = diale... | org . junit . Assert . assertEquals ( expected , result ) |
returns_true_if_all_specifications_are_satisfied ( ) { when ( mockSpec1 . isSatisfiedBy ( this . request ) ) . thenReturn ( true ) ; when ( mockSpec2 . isSatisfiedBy ( this . request ) ) . thenReturn ( true ) ; boolean isSatisfied = this . compositeSpecification . isSatisfiedBy ( this . request ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( isSatisfied ) |
testGetPool ( ) { com . bazaarvoice . ostrich . ServicePool < com . bazaarvoice . ostrich . pool . ServicePoolProxiesTest . Service > pool = mock ( com . bazaarvoice . ostrich . ServicePool . class ) ; com . bazaarvoice . ostrich . pool . ServicePoolProxiesTest . Service service = com . bazaarvoice . ostrich . pool . S... | org . junit . Assert . assertSame ( pool , com . bazaarvoice . ostrich . pool . ServicePoolProxies . getPool ( service ) ) |
testRead_ifReaderIsCalled_itReadsSuccessfully ( ) { new com . graphhopper . jsprit . io . problem . VrpXMLReader ( VehicleRoutingProblem . Builder . newInstance ( ) , new java . util . ArrayList < com . graphhopper . jsprit . core . problem . solution . VehicleRoutingProblemSolution > ( ) ) . read ( getClass ( ) . getR... | org . junit . Assert . assertTrue ( true ) |
testGetName ( ) { when ( mocked_element . getName ( ) ) . thenReturn ( "NAME" ) ; mmarquee . automation . controls . menu . AutomationMenuItem item = new mmarquee . automation . controls . menu . AutomationMenuItem ( new mmarquee . automation . controls . ElementBuilder ( mocked_element ) . addPattern ( collapse ) . ad... | org . junit . Assert . assertEquals ( "NAME" , item . getName ( ) ) |
testGetEnclosingElementForBuiltInTopLevelClasses ( ) { initCompiler ( ) ; javax . lang . model . element . TypeElement stringElement = elements . getTypeElement ( "java.lang.String" ) ; javax . lang . model . element . PackageElement javaLangElement = elements . getPackageElement ( "java.lang" ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertSame ( javaLangElement , stringElement . getEnclosingElement ( ) ) |
testListWorkReportLine ( ) { int previous = workReportLineDAO . list ( org . libreplan . business . workreports . entities . WorkReportLine . class ) . size ( ) ; org . libreplan . business . workreports . entities . WorkReportLine workReportType1 = createValidWorkReportLine ( ) ; workReportLineDAO . save ( workReportT... | org . junit . Assert . assertEquals ( ( previous + 2 ) , list . size ( ) ) |
sign_sameAs ( ) { byte [ ] toSign = new byte [ ] { 13 , 14 , 10 , 13 } ; com . google . auth . oauth2 . ServiceAccountCredentials credentials = com . google . auth . oauth2 . ServiceAccountCredentials . fromPkcs8 ( com . google . auth . oauth2 . ServiceAccountCredentialsTest . SA_CLIENT_ID , com . google . auth . oauth... | org . junit . Assert . assertArrayEquals ( signature . sign ( ) , signedBytes ) |
testGetAllTagsForResourceType ( ) { java . util . List < org . hl7 . fhir . instance . model . AtomCategory > tags = testClient . getAllTagsForResourceType ( org . hl7 . fhir . instance . model . Patient . class ) ; "<AssertPlaceHolder>" ; } getAllTagsForResourceType ( java . lang . Class ) { org . hl7 . fhir . instanc... | org . junit . Assert . assertTrue ( ( ( tags != null ) && ( ( tags . size ( ) ) > 0 ) ) ) |
serverAtTheEnd ( ) { org . jboss . hal . dmr . ResourceAddress input = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "profile" , "full" ) . add ( "subsystem" , "mail" ) . add ( "mail-session" , "default" ) . add ( "server" , "imap" ) ; org . jboss . hal . dmr . ResourceAddress expected = new org . jboss . h... | org . junit . Assert . assertEquals ( expected , result ) |
testConcurrentModification ( ) { java . util . Map < java . lang . String , java . lang . Integer > map = new org . apache . cayenne . util . WeakValueMap ( 3 ) ; map . put ( "key_1" , 123 ) ; map . put ( "key_2" , 42 ) ; map . put ( "key_3" , 543 ) ; map . put ( "key_4" , 321 ) ; "<AssertPlaceHolder>" ; for ( Map . En... | org . junit . Assert . assertEquals ( 4 , map . size ( ) ) |
testCallsHealthCheckAfterRetriableException ( ) { final java . util . concurrent . atomic . AtomicBoolean healthCheckCalled = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; when ( _serviceFactory . isHealthy ( any ( com . bazaarvoice . ostrich . ServiceEndPoint . class ) ) ) . then ( new org . mockit... | org . junit . Assert . assertTrue ( healthCheckCalled . get ( ) ) |
testVectorIndexing ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 10 , 10 , DataType . DOUBLE ) . reshape ( 1 , ( - 1 ) ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2 , 3 ... | org . junit . Assert . assertEquals ( assertion , viewTest ) |
upload1 ( ) { java . io . File file = new java . io . File ( "/Users/jy/Downloads/weixin4j.png" ) ; com . foxinmy . weixin4j . model . media . MediaUploadResult mediaId = mediaApi . uploadMedia ( false , new java . io . FileInputStream ( file ) , file . getName ( ) ) ; "<AssertPlaceHolder>" ; System . err . println ( m... | org . junit . Assert . assertNotNull ( mediaId ) |
getInputStream ( ) { final java . lang . String testData = "test<sp>data" ; final java . lang . String base64TestData = org . apache . commons . codec . binary . Base64 . encodeBase64String ( testData . getBytes ( ) ) . trim ( ) ; org . exist . xquery . value . BinaryValue binaryValue = new org . exist . xquery . value... | org . junit . Assert . assertArrayEquals ( testData . getBytes ( ) , baos . toByteArray ( ) ) |
testInsert_Item_PrecisionLoss ( ) { com . jmethods . catatumbo . entities . Item entity = new com . jmethods . catatumbo . entities . Item ( ) ; entity . setName ( "Candy" ) ; entity . setPrice ( new java . math . BigDecimal ( "1.699" ) ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ... | org . junit . Assert . assertTrue ( entity . equals ( entity2 ) ) |
testKeyPatterns ( ) { java . util . Map < java . lang . String , java . lang . Integer > map = extractFromFile ( "vertx.config" , ( ( getClass ( ) . getSimpleName ( ) ) + "-pattern-keys.yml" ) ) ; java . lang . Object [ ] testData = new java . lang . Object [ ] { "web.port" , true , "web_port" , true , "webPort" , true... | org . junit . Assert . assertEquals ( testData [ ( i + 1 ) ] , map . containsKey ( testData [ i ] ) ) |
hasPermissionToDeployWhenEmptyList ( ) { ch . puzzle . itc . mobiliar . business . security . control . List < ch . puzzle . itc . mobiliar . business . security . control . RoleEntity > deployableRoles = new ch . puzzle . itc . mobiliar . business . security . control . ArrayList ( ) ; javax . persistence . EntityMana... | org . junit . Assert . assertFalse ( result ) |
communicationNotAllowedNotAcceptedChargingStation ( ) { io . motown . operatorapi . viewmodel . persistence . entities . ChargingStation cs = new io . motown . operatorapi . viewmodel . persistence . entities . ChargingStation ( "" ) ; cs . setConfigured ( true ) ; "<AssertPlaceHolder>" ; } communicationAllowed ( ) { r... | org . junit . Assert . assertFalse ( cs . communicationAllowed ( ) ) |
shouldExecuteNonAdminPages ( ) { when ( request . getContextPath ( ) ) . thenReturn ( "" ) ; when ( request . getRequestURI ( ) ) . thenReturn ( "/my/uri" ) ; "<AssertPlaceHolder>" ; } requestingStaticFile ( javax . servlet . http . HttpServletRequest ) { java . net . URL resourceUrl = context . getResource ( uriRelati... | org . junit . Assert . assertThat ( handler . requestingStaticFile ( request ) , org . hamcrest . Matchers . is ( false ) ) |
testHasNext_whenNoFilter ( ) { mockNextDirent . d_ino = 1 ; iterator . setNext ( mockNextDirent ) ; doNothing ( ) . when ( iterator ) . advance ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { advance ( ) ; if ( null != ( filter ) ) { try { while ( ( ( next . d_ino ) != 0 ) && ( ! ( filter . accept ( nextPath ) ) ) ) { ad... | org . junit . Assert . assertTrue ( iterator . hasNext ( ) ) |
testfilecfg ( ) { com . jfireframework . context . JfireContext jfireContext = new com . jfireframework . context . JfireContextImpl ( "com.jfireframework.context.test.function.initmethod" ) ; jfireContext . readConfig ( new java . io . File ( this . getClass ( ) . getClassLoader ( ) . getResource ( "init.json" ) . toU... | org . junit . Assert . assertEquals ( 12 , person2 . getAge ( ) ) |
assertRegister ( ) { io . netty . channel . ChannelId channelId = mock ( io . netty . channel . ChannelId . class ) ; org . apache . shardingsphere . shardingproxy . frontend . executor . ChannelThreadExecutorGroup . getInstance ( ) . register ( channelId ) ; "<AssertPlaceHolder>" ; org . apache . shardingsphere . shar... | org . junit . Assert . assertNotNull ( org . apache . shardingsphere . shardingproxy . frontend . executor . ChannelThreadExecutorGroup . getInstance ( ) . get ( channelId ) ) |
testGetParsedTags ( ) { java . lang . String cmd = "hello" ; java . lang . String args = "" ; org . irods . jargon . core . packinstr . ExecCmd execCmd = org . irods . jargon . core . packinstr . ExecCmd . instanceWithCommandPriorTo25 ( cmd , args ) ; java . lang . String actualXML = execCmd . getParsedTags ( ) ; java ... | org . junit . Assert . assertEquals ( "</KeyValPair_PI>\n" 0 , expectedXML , actualXML ) |
equals ( ) { final org . apache . usergrid . persistence . model . entity . SimpleId entityId = new org . apache . usergrid . persistence . model . entity . SimpleId ( "test" ) ; final java . util . UUID version = org . apache . usergrid . persistence . model . util . UUIDGenerator . newTimeUUID ( ) ; final org . apach... | org . junit . Assert . assertEquals ( first , second ) |
testGetGeolayerNumBands ( ) { "<AssertPlaceHolder>" ; } getGeolayerNumBands ( ) { int numBands = 0 ; org . esa . snap . core . datamodel . MetadataElement currentElement ; if ( ( currentElement = rootElement . getElement ( SpotConstants . TAG_GEOLAYER ) ) != null ) { numBands = java . lang . Integer . parseInt ( curren... | org . junit . Assert . assertEquals ( 2 , metadata . getGeolayerNumBands ( ) ) |
testGetObjectInfo ( ) { "<AssertPlaceHolder>" ; } getObjectInfo ( ) { if ( ( objectInfo ) == null ) { switch ( edu . illinois . library . cantaloupe . source . LookupStrategy . from ( Key . S3SOURCE_LOOKUP_STRATEGY ) ) { case DELEGATE_SCRIPT : try { objectInfo = getObjectInfoUsingDelegateStrategy ( ) ; } catch ( javax ... | org . junit . Assert . assertNotNull ( instance . getObjectInfo ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.