input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldPassSortAscendingToDataRows ( ) { this . uiPagedData . setSortAscending ( false ) ; this . uiPagedData . encodeEnd ( this . context ) ; org . springframework . springfaces . page . model . PagedDataRows rows = ( ( org . springframework . springfaces . page . model . PagedDataRows ) ( this . requestMap . get ( "pa... | org . junit . Assert . assertThat ( rows . isSortAscending ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testEmptyAdd ( ) { com . firefly . codec . http2 . hpack . HpackContext ctx = new com . firefly . codec . http2 . hpack . HpackContext ( 0 ) ; com . firefly . codec . http2 . model . HttpField field = new com . firefly . codec . http2 . model . HttpField ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } add ( V ) { @ com .... | org . junit . Assert . assertNull ( ctx . add ( field ) ) |
test21 ( ) { java . lang . System . out . println ( "getUser" ) ; token . setKey ( org . demoiselle . jee . security . jwt . impl . TokenManagerImplTest . localtoken ) ; token . setType ( TokenType . JWT ) ; dml . setName ( "Alterar" 3 ) ; dml . setIdentity ( "Alterar" 2 ) ; dml . addRole ( "Alterar" 6 ) ; dml . addRol... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetReplyToFromMessageWithNoProperties ( ) { org . apache . qpid . proton . message . impl . MessageImpl protonMessage = ( ( org . apache . qpid . proton . message . impl . MessageImpl ) ( Message . Factory . create ( ) ) ) ; org . apache . activemq . artemis . protocol . amqp . broker . AMQPMessage decoded = encode... | org . junit . Assert . assertNull ( decoded . getReplyTo ( ) ) |
test_with_non_matching_prefix_and_single_host ( ) { org . apache . sling . commons . testing . osgi . MockBundle bundle = new org . apache . sling . commons . testing . osgi . MockBundle ( ( - 1 ) ) ; org . apache . sling . commons . testing . osgi . MockComponentContext ctx = new org . apache . sling . commons . testi... | org . junit . Assert . assertEquals ( "/content/clientlib/test.css" , out . getValue ( 0 ) ) |
testContentTypeEvaluationNullMetadata ( ) { java . lang . String methodName = "testContentTypeEvaluationNullMetadata" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( "***************<sp>START:<sp>{}<sp>*****************" , methodName ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate ctp = new dd... | org . junit . Assert . assertTrue ( ctp . matches ( testEvent ) ) |
testUnion2 ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . Graph . create ( ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; java . lang . String q = "us:test()" 1 + ( ( ( ( ( ( ( ( ( ( ( ( ( "us:test()" + "}" ) + "... | org . junit . Assert . assertEquals ( 3 , map . size ( ) ) |
testTraceDropFlag ( ) { b . traceEnter ( mi111 , ( 10 * ( com . jitlogic . zorka . core . test . spy . LTraceHandlerUnitTest . MS ) ) ) ; b . traceBegin ( t1 , 100L , TraceMarker . DROP_INTERIM ) ; b . markTraceFlags ( 0 , TraceMarker . DROP_TRACE ) ; b . traceReturn ( ( 20 * ( com . jitlogic . zorka . core . test . sp... | org . junit . Assert . assertEquals ( 0 , records . size ( ) ) |
testDiv ( ) { int theResult = ( ( int ) ( de . mirkosertic . bytecoder . core . DoubleMathTest . div ( 30 , 10 ) ) ) ; "<AssertPlaceHolder>" ; } div ( double , double ) { return a / b ; } | org . junit . Assert . assertEquals ( 3 , theResult , 0 ) |
testDropout ( ) { org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; double p = 0.5 ; org . nd4j . linalg . api . ndarray . INDArray ia = org . nd4j . linalg . factory . Nd4j . create ( new long [ ] { 2 , 2 } ) ; org . nd4j . autodiff . samediff . SDVariable inpu... | org . junit . Assert . assertArrayEquals ( new long [ ] { 2 , 2 } , res . getShape ( ) ) |
shouldNotReturnTriggerTwice ( ) { com . gemserk . animation4j . gdx . Animation animation = new com . gemserk . animation4j . gdx . Animation ( new com . badlogic . gdx . graphics . g2d . Sprite [ ] { } , new com . gemserk . animation4j . FrameAnimationImpl ( true , 50.0F , 25.0F , 30.0F ) ) ; com . gemserk . animation... | org . junit . Assert . assertFalse ( animationMonitor . isTriggered ( ) ) |
testFlushAfterClose ( ) { java . io . OutputStream os = makeObject ( ) ; os . close ( ) ; try { os . flush ( ) ; try { os . write ( 0 ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( "Inconsistent<sp>write/flush<sp>after<sp>close" ) ; } } catch ( java . io . IOException e ) { "<AssertPlaceHolde... | org . junit . Assert . assertNotNull ( e . getMessage ( ) ) |
whenCreatedWithString_isNotInteger ( ) { io . kubernetes . client . custom . IntOrString intOrString = new io . kubernetes . client . custom . IntOrString ( "17" ) ; "<AssertPlaceHolder>" ; } isInteger ( ) { return isInt ; } | org . junit . Assert . assertThat ( intOrString . isInteger ( ) , org . hamcrest . Matchers . is ( false ) ) |
testShowInternalInputDialog ( ) { org . evosuite . testsuite . TestSuiteChromosome suite = new org . evosuite . testsuite . TestSuiteChromosome ( ) ; org . evosuite . instrumentation . InstrumentingClassLoader cl = new org . evosuite . instrumentation . InstrumentingClassLoader ( ) ; org . evosuite . testcase . TestCas... | org . junit . Assert . assertEquals ( 4 , coveredGoals . size ( ) ) |
testFindAll ( ) { final com . example . domain . Books result0 = bookService . getBooks ( ) ; final java . util . List < com . example . domain . Book > bookList = result0 . getBookList ( ) ; if ( bookList != null ) { for ( final com . example . domain . Book book : bookList ) { com . example . sevice . TUMyServiceTest... | org . junit . Assert . assertNotNull ( book . getBookId ( ) ) |
testDelete ( ) { int deleteNum = dao . delete ( 1 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , deleteNum ) |
remove_2arg_Existing_EqualValue ( ) { java . lang . Long key = java . lang . System . currentTimeMillis ( ) ; java . lang . String value = "value" + key ; cache . put ( key , value ) ; "<AssertPlaceHolder>" ; } remove ( K , V ) { return new Semantic . UpdateExisting < K , V , java . lang . Boolean > ( ) { @ java . lang... | org . junit . Assert . assertTrue ( cache . remove ( key , new java . lang . String ( value ) ) ) |
testSetupLayout ( ) { properties . connection . setupLayout ( ) ; properties . module . main . setupLayout ( ) ; properties . module . setupLayout ( ) ; properties . setupLayout ( ) ; org . talend . daikon . properties . presentation . Form mainForm = properties . getForm ( Form . MAIN ) ; "<AssertPlaceHolder>" ; } set... | org . junit . Assert . assertNotNull ( mainForm ) |
testTransportManagerInitSucc ( org . apache . servicecomb . core . Transport , org . apache . servicecomb . core . Endpoint , org . apache . servicecomb . serviceregistry . RegistryUtils , org . apache . servicecomb . serviceregistry . api . registry . MicroserviceInstance ) { new mockit . Expectations ( ) { { transpor... | org . junit . Assert . assertEquals ( manager . findTransport ( "test" ) , transport ) |
testOK ( ) { final byte [ ] encrypted = encrypter . encrypt ( org . pac4j . play . store . VALUE . getBytes ( StandardCharsets . UTF_8 ) ) ; final byte [ ] decrypted = encrypter . decrypt ( encrypted ) ; "<AssertPlaceHolder>" ; } decrypt ( byte [ ] ) { return encryptedBytes ; } | org . junit . Assert . assertEquals ( org . pac4j . play . store . VALUE , new java . lang . String ( decrypted , java . nio . charset . StandardCharsets . UTF_8 ) ) |
testProcessMediaDelete ( ) { org . easymock . EasyMock . replay ( responseMock ) ; org . easymock . EasyMock . expect ( requestMock . getMethod ( ) ) . andReturn ( "DELETE" ) ; org . easymock . EasyMock . replay ( requestMock ) ; org . easymock . EasyMock . expect ( adapterMock . deleteMedia ( requestMock ) ) . andRetu... | org . junit . Assert . assertNotNull ( response ) |
findNoUserByContainingEmailAddresses ( ) { createUserForContainsTest ( ) ; org . springframework . data . neo4j . examples . movies . domain . User foundUser = userRepository . findByEmailAddressesContains ( java . util . Collections . singletonList ( org . springframework . data . neo4j . examples . movies . MoviesInt... | org . junit . Assert . assertNull ( foundUser ) |
convertPolygon_WithRedundantSpaces_ShouldConvert ( ) { java . lang . String wkt = "<sp>POLYGON<sp>(<sp>(30<sp>10,<sp>40<sp>40<sp>,<sp>20<sp>40,<sp>10<sp>20,<sp>30<sp>10<sp>)<sp>)<sp>" ; java . lang . String geoJson = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . toGeoJson ( wkt ) ; java . lang . String expec... | org . junit . Assert . assertEquals ( expectedGeoJson , geoJson ) |
shouldImportCndForCars ( ) { importer . importFrom ( openCndFile ( "cars.cnd" ) , problems ) ; if ( ( problems . size ( ) ) != 0 ) printProblems ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; } | org . junit . Assert . assertThat ( problems . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
foldLeft_A$Object$Function2 ( ) { com . m3 . scalaflavor4j . Nil < java . lang . String > target = com . m3 . scalaflavor4j . Nil . < java . lang . String > apply ( ) ; java . lang . String z = "" ; com . m3 . scalaflavor4j . F2 < java . lang . String , java . lang . String , java . lang . String > op = new com . m3 . ... | org . junit . Assert . assertThat ( actual . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testThrehold ( ) { jCas . setDocumentText ( "This<sp>text<sp>isn't<sp>going<sp>to<sp>score<sp>above<sp>the<sp>threshold." ) ; processJCas ( DocumentType . PARAM_MODEL , getClass ( ) . getResource ( uk . gov . dstl . baleen . annotators . stats . DocumentTypeTest . DOCUMENTTYPE_BIN ) . getPath ( ) , DocumentType . PARAM... | org . junit . Assert . assertEquals ( null , da . getDocType ( ) ) |
testFindWorkItemDefinition ( ) { final org . drools . workbench . models . datamodel . workitems . PortableWorkDefinition workItem1 = getMock ( "workItem1" ) ; final org . drools . workbench . models . datamodel . workitems . PortableWorkDefinition workItem2 = getMock ( "workItem2" ) ; final java . util . HashSet < org... | org . junit . Assert . assertEquals ( workItem1 , workItem ) |
uploadDirectoryWithRetries ( ) { final com . microsoft . azure . maven . FTPUploader uploaderSpy = spy ( ftpUploader ) ; org . apache . maven . plugin . MojoExecutionException exception = null ; doReturn ( false ) . when ( uploaderSpy ) . uploadDirectory ( anyString ( ) , anyString ( ) , anyString ( ) , anyString ( ) ,... | org . junit . Assert . assertNotNull ( exception ) |
TestMultiFormatLoaderWithEmptyRecords ( ) { org . junit . Assume . assumeTrue ( ( ( com . twitter . elephantbird . pig . load . TestErrorsInInput . pigServer ) != null ) ) ; java . lang . String testDir = ( java . lang . System . getProperty ( "test.build.data" ) ) + "/TestEmptyRecords" ; final java . io . File inDir =... | org . junit . Assert . assertEquals ( expected , rows . next ( ) . toString ( ) ) |
testPostIndexesAreCreated ( ) { android . database . Cursor cursor = com . memtrip . sqlking . operation . function . Raw . getBuilder ( ) . query ( "PRAGMA<sp>INDEX_LIST('Post');" ) . execute ( getSQLProvider ( ) ) ; java . util . List < java . lang . String > indexes = getIndexes ( cursor ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( 1 , indexes . size ( ) ) |
getControllerInstanceStatus_VServerProvisioning ( ) { parameters . put ( PropertyHandler . SYSTEM_TEMPLATE_ID , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . SYSTEM_TEMPLATE_ID , "" ) ) ; paramHandler . setState ( FlowState . VSERVER_CREATED ) ; org . oscm . app . v2_0 . data . InstanceStatus result ... | org . junit . Assert . assertNotNull ( result ) |
testConvertNullListOfJavaTypes ( ) { final java . util . List < org . springframework . roo . classpath . details . annotations . AnnotatedJavaType > annotatedTypes = org . springframework . roo . classpath . details . annotations . AnnotatedJavaType . convertFromJavaTypes ( ( ( java . util . List < org . springframewo... | org . junit . Assert . assertEquals ( 0 , annotatedTypes . size ( ) ) |
testVoerRegelUitMetOverlijdenNull ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView huidigeSituatie = maakHuidigeSituatie ( ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht nieuweSituatie = maakNieuweSituatie ( nl . bzk . brp . bijhouding . business . regels . impl . g... | org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) ) |
testSetLocalPhoneAutocomplete ( ) { com . github . bordertech . wcomponents . WPhoneNumberField field = new com . github . bordertech . wcomponents . WPhoneNumberField ( ) ; java . lang . String expected = Telephone . LOCAL . getValue ( ) ; field . setLocalPhoneAutocomplete ( ) ; "<AssertPlaceHolder>" ; } getAutocomple... | org . junit . Assert . assertEquals ( expected , field . getAutocomplete ( ) ) |
testToString ( ) { org . apache . poi . ddf . UnknownEscherRecord r = new org . apache . poi . ddf . UnknownEscherRecord ( ) ; r . setOptions ( ( ( short ) ( 4660 ) ) ) ; r . setRecordId ( ( ( short ) ( 61714 ) ) ) ; byte [ ] data = new byte [ 8 ] ; r . serialize ( 0 , data , new org . apache . poi . ddf . NullEscherSe... | org . junit . Assert . assertEquals ( expected , r . toString ( ) ) |
testReducerForIntWritableKeyAndValue ( ) { org . apache . hadoop . io . IntWritable key = new org . apache . hadoop . io . IntWritable ( 123 ) ; co . nubetech . hiho . dedup . HihoTuple hihoTuple = new co . nubetech . hiho . dedup . HihoTuple ( ) ; hihoTuple . setKey ( key ) ; org . apache . hadoop . io . IntWritable v... | org . junit . Assert . assertEquals ( 1 , context . getCounter ( DedupRecordCounter . OUTPUT ) . getValue ( ) ) |
getSurroundingCellsNearLowerRight ( ) { com . fundynamic . d2tm . game . map . Cell cell = makeCell ( ( ( map . getWidth ( ) ) + 1 ) , ( ( map . getHeight ( ) ) + 1 ) ) ; java . util . List < com . fundynamic . d2tm . game . map . Cell > surroundingCells = cell . getSurroundingCells ( ) ; "<AssertPlaceHolder>" ; } getS... | org . junit . Assert . assertEquals ( 3 , surroundingCells . size ( ) ) |
testGetTotalTimeMillis ( ) { frame . addElapsedTime ( 1 ) ; frame . addElapsedTime ( 2 ) ; "<AssertPlaceHolder>" ; } getTotalTimeMilis ( ) { return java . lang . Math . round ( this . elapsedTimeStatistics . getValueSum ( ) ) ; } | org . junit . Assert . assertEquals ( 3 , frame . getTotalTimeMilis ( ) ) |
select ( ) { org . qlrm . executor . JpaQueryExecutor queryExecutor = new org . qlrm . executor . JpaQueryExecutor ( ) ; java . util . List < org . qlrm . to . EmployeeTO > list = queryExecutor . executeSelect ( em , org . qlrm . to . EmployeeTO . class , "select.sql" ) ; "<AssertPlaceHolder>" ; for ( org . qlrm . to .... | org . junit . Assert . assertNotNull ( list ) |
testWithEmptyGraphWithoutVertices ( ) { org . apache . flink . api . java . DataSet < org . apache . flink . graph . Edge < org . apache . flink . types . LongValue , org . apache . flink . api . java . tuple . Tuple2 < org . apache . flink . types . NullValue , org . apache . flink . graph . asm . degree . annotate . ... | org . junit . Assert . assertEquals ( 0 , targetDegrees . collect ( ) . size ( ) ) |
extractAssertionFromRespondingGatewayDSRequestType ( ) { gov . hhs . fha . nhinc . event . builder . AssertionDescriptionExtractor extractor = new gov . hhs . fha . nhinc . event . builder . AssertionDescriptionExtractor ( ) ; gov . hhs . fha . nhinc . common . nhinccommonentity . RespondingGatewayProvideAndRegisterDoc... | org . junit . Assert . assertNotNull ( returnAssertion ) |
testLocalhostUnknownHostException ( ) { java . net . UnknownHostException unknownHostException = new java . net . UnknownHostException ( "X-TEST-UHE-X" ) ; try { org . powermock . api . mockito . PowerMockito . mockStatic ( java . net . InetAddress . class ) ; org . powermock . api . mockito . PowerMockito . when ( jav... | org . junit . Assert . assertSame ( unknownHostException , ex ) |
testVisitFile ( ) { java . nio . file . Path file = tempPath . resolve ( "file" ) ; java . nio . file . Files . createFile ( file ) ; instance . visitFile ( file , fileAttributesForFile ( ) ) ; "<AssertPlaceHolder>" ; } fileAttributesForFile ( ) { return new java . nio . file . attribute . BasicFileAttributes ( ) { @ e... | org . junit . Assert . assertFalse ( java . nio . file . Files . exists ( file ) ) |
testSetFps ( ) { com . bixly . pastevid . recorders . VideoRecorderTest . log ( "setFps" ) ; int framesPerSecond = 0 ; com . bixly . pastevid . recorders . Recorder recorder = new com . bixly . pastevid . recorders . Recorder ( null ) ; com . bixly . pastevid . recorders . VideoRecorder instance = new com . bixly . pas... | org . junit . Assert . assertEquals ( framesPerSecond , instance . getFps ( ) ) |
testGetCalculateCRC32SqlFileAndTable ( ) { java . lang . String sql = org . sagebionetworks . table . cluster . SQLUtils . getCalculateCRC32Sql ( org . sagebionetworks . repo . model . table . ViewTypeMask . getMaskForDepricatedType ( ViewType . file_and_table ) ) ; java . lang . String expected = "SELECT<sp>SUM(CRC32(... | org . junit . Assert . assertEquals ( expected , sql ) |
testNewFormatterNullNullNull ( ) { com . sun . mail . util . logging . CollectorFormatter f = new com . sun . mail . util . logging . CollectorFormatter ( ( ( java . lang . String ) ( null ) ) , ( ( java . util . logging . Formatter ) ( null ) ) , ( ( com . sun . mail . util . logging . Comparator < com . sun . mail . ... | org . junit . Assert . assertEquals ( com . sun . mail . util . logging . CollectorFormatter . class , f . getClass ( ) ) |
testWaitForAnswerError ( ) { jline . console . ConsoleReader consoleReader = mockConsoleReader ( "test-answer\n" ) ; consoleReader . getInput ( ) . close ( ) ; mockAbstractStep . setConsoleReader ( consoleReader ) ; java . lang . String answer = mockAbstractStep . waitForAnswer ( ) ; "<AssertPlaceHolder>" ; } waitForAn... | org . junit . Assert . assertThat ( answer , org . hamcrest . Matchers . equalTo ( "" ) ) |
isImageReturnsFalseIfFileHasNoExtension ( ) { "<AssertPlaceHolder>" ; } isImage ( java . lang . String ) { if ( null == extension ) { return false ; } return ( java . util . Arrays . binarySearch ( com . buddycloud . mediaserver . business . util . ImageUtils . FORMATS , extension . toLowerCase ( ) ) ) >= 0 ; } | org . junit . Assert . assertFalse ( com . buddycloud . mediaserver . business . util . ImageUtils . isImage ( null ) ) |
testGetObjectInfoUsingBasicLookupStrategyWithoutPrefixOrSuffix ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; config . setProperty ( Key . S3SOURCE_PATH_PREFIX , "" ) ; config . setProperty ( Key . S3SOURCE... | org . junit . Assert . assertEquals ( "id" , instance . getObjectInfo ( ) . getKey ( ) ) |
getLocalFunctionCoreToolsVersionFailed ( ) { final com . microsoft . azure . maven . function . AbstractFunctionMojo mojo = mock ( com . microsoft . azure . maven . function . AbstractFunctionMojo . class ) ; final com . microsoft . azure . maven . function . handlers . CommandHandler commandHandler = mock ( com . micr... | org . junit . Assert . assertNull ( functionCoreToolsHandlerSpy . getLocalFunctionCoreToolsVersion ( ) ) |
testSelectWithTableNameNowNotFindWithTableName ( ) { java . sql . ResultSet resultSet = stat . executeQuery ( "select<sp>test.id<sp>from<sp>test" ) ; "<AssertPlaceHolder>" ; resultSet . findColumn ( "test.id" ) ; } next ( ) { if ( ! ( open ) ) { return false ; } lastCol = - 1 ; if ( ( row ) == 0 ) { ( row ) ++ ; return... | org . junit . Assert . assertTrue ( resultSet . next ( ) ) |
testAddAllEmpty ( ) { "<AssertPlaceHolder>" ; } addAll ( java . lang . Object [ ] ) { assert elements != null ; if ( ( elements . length ) <= 0 ) { return false ; } int length = array . length ; int added = 0 ; for ( int i = 0 ; i < ( elements . length ) ; ++ i ) { java . lang . Object element = elements [ i ] ; if ( (... | org . junit . Assert . assertFalse ( set . addAll ( java . util . Arrays . asList ( ) ) ) |
test_issue874 ( ) { try ( com . marklogic . client . eval . EvalResultIterator iterator = new com . marklogic . client . eval . EvalResultIterator ( ) { @ com . marklogic . client . test . Override public void close ( ) throws com . marklogic . client . test . RuntimeException { throw new java . lang . RuntimeException... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
KeyInConstructorSymmetricVerificationKeyShouldMatch ( ) { com . microsoft . windowsazure . services . media . implementation . templates . tokenrestriction . SymmetricVerificationKey key = new com . microsoft . windowsazure . services . media . implementation . templates . tokenrestriction . SymmetricVerificationKey ( ... | org . junit . Assert . assertArrayEquals ( keyValue , resultsValue ) |
testTeamMemberSystemHookEvent ( ) { org . gitlab4j . api . systemhooks . TeamMemberSystemHookEvent event = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . systemhooks . TeamMemberSystemHookEvent . class , "team-member-system-hook-event.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , ... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( event , "team-member-system-hook-event.json" ) ) |
testGetAucomplete ( ) { java . lang . String testString = "foo" ; com . github . bordertech . wcomponents . autocomplete . AutocompleteablePhone_Test . MyAutocompleteable component = new com . github . bordertech . wcomponents . autocomplete . AutocompleteablePhone_Test . MyAutocompleteable ( ) ; component . setAutocom... | org . junit . Assert . assertEquals ( testString , component . getAutocomplete ( ) ) |
testRemoveSpecialCharacters ( ) { com . ctrip . xpipe . redis . console . alert . AlertEntity alertEntity = new com . ctrip . xpipe . redis . console . alert . AlertEntity ( new com . ctrip . xpipe . endpoint . HostPort ( "" , 6379 ) , "dc" , "cluster" , "shard" , "message\nmessage1" , ALERT_TYPE . CLIENT_INCONSIS ) ; ... | org . junit . Assert . assertFalse ( alertEntity . getMessage ( ) . contains ( "\n" ) ) |
builder_copy ( ) { ezvcard . util . PartialDate orig = ezvcard . util . PartialDate . builder ( ) . year ( 2015 ) . month ( 3 ) . date ( 5 ) . hour ( 12 ) . minute ( 1 ) . second ( 20 ) . offset ( new ezvcard . util . UtcOffset ( false , ( - 5 ) , 0 ) ) . build ( ) ; ezvcard . util . PartialDate copy = ezvcard . util .... | org . junit . Assert . assertEquals ( orig , copy ) |
nativeTransformer_testXmlToXml_xsl ( ) { javax . xml . transform . TransformerFactory transformerFactory = org . apache . xalan . xsltc . trax . TransformerFactoryImpl . newInstance ( ) ; java . lang . String xslPath = ( org . ikasan . component . converter . xml . XsltConverterTest . CLASSPATH_URL_PREFIX ) + "testXmlT... | org . junit . Assert . assertEquals ( expectedOutput , new java . lang . String ( outputBytes ) ) |
testFromMessageFailsForMalformedReplyToAddress ( ) { final java . lang . String correlationId = "the-correlation-id" ; final org . apache . qpid . proton . message . Message message = mock ( org . apache . qpid . proton . message . Message . class ) ; when ( message . getSubject ( ) ) . thenReturn ( "doThis" ) ; when (... | org . junit . Assert . assertFalse ( org . eclipse . hono . client . Command . from ( message , Constants . DEFAULT_TENANT , "4711" ) . isValid ( ) ) |
testfavorites ( ) { "<AssertPlaceHolder>" ; } favoriteResources ( ) { if ( ( favorites . get ( ) ) == null ) { favorites . compareAndSet ( null , new com . smartsheet . api . internal . FavoriteResourcesImpl ( this ) ) ; } return favorites . get ( ) ; } | org . junit . Assert . assertNotNull ( smartsheet . favoriteResources ( ) ) |
testRemoveToken ( ) { oAuthTokenCacheService . removeToken ( "access" ) ; "<AssertPlaceHolder>" ; } removeToken ( java . lang . String ) { if ( oauthToken == null ) { return ; } tokenCache . invalidate ( oauthToken ) ; } | org . junit . Assert . assertEquals ( 0 , oAuthTokenCacheService . tokenCache . size ( ) ) |
testVerbosePrintSelfReference ( ) { final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; final java . io . PrintStream outPrint = new java . io . PrintStream ( out ) ; final java . lang . String LABEL = "B" 3 ; final java . lang . String INDENT = "<sp>" ; final java . util . Map < j... | org . junit . Assert . assertEquals ( EXPECTED_OUT , out . toString ( ) ) |
consumeUntilSuccessful ( ) { org . mule . runtime . core . api . util . func . OnceTestCase . CountingConsumer consumer = new org . mule . runtime . core . api . util . func . OnceTestCase . CountingConsumer ( ) ; org . mule . runtime . core . api . util . func . Once . ConsumeOnce < java . lang . String > once = org .... | org . junit . Assert . assertThat ( consumer . getInvokationCount ( ) , org . hamcrest . CoreMatchers . is ( 3 ) ) |
testFindWithEmptyPathNonMatchingType ( ) { final com . allanbank . mongodb . bson . impl . RootDocument element = new com . allanbank . mongodb . bson . impl . RootDocument ( new com . allanbank . mongodb . bson . element . BooleanElement ( "1" , false ) ) ; final java . util . List < com . allanbank . mongodb . bson .... | org . junit . Assert . assertEquals ( 0 , elements . size ( ) ) |
testEstimateJoinNodeCost ( ) { org . teiid . query . metadata . QueryMetadataInterface metadata = org . teiid . query . unittest . RealMetadataFactory . example4 ( ) ; org . teiid . query . optimizer . relational . plantree . PlanNode joinNode = org . teiid . query . optimizer . relational . rules . TestCalculateCostUt... | org . junit . Assert . assertTrue ( ( cost == ( NewCalculateCostUtil . UNKNOWN_VALUE ) ) ) |
testWordsSeparatedBySpacesCorrect ( ) { java . lang . String inputStringCorrect = "word<sp>wod2" ; java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( "[\\w+|\\s]" ) ; java . util . regex . Matcher matcher = pattern . matcher ( inputStringCorrect ) ; boolean isValid = matcher . matches ( )... | org . junit . Assert . assertFalse ( isValid ) |
getWhenDisabledBySystemStringGivenDefaultsThenReturnsEmptyString ( ) { final com . nirima . jenkins . plugins . docker . DockerDisabledTest . TestClass i = new com . nirima . jenkins . plugins . docker . DockerDisabledTest . TestClass ( ) ; final java . lang . String actual = i . getWhenDisabledBySystemString ( ) ; "<A... | org . junit . Assert . assertEquals ( "" , actual ) |
deleteIndex ( ) { try { db . createCollection ( com . arangodb . ArangoDatabaseTest . COLLECTION_NAME , null ) ; final java . util . Collection < java . lang . String > fields = new java . util . ArrayList < java . lang . String > ( ) ; fields . add ( "a" ) ; final com . arangodb . entity . IndexEntity createResult = d... | org . junit . Assert . assertThat ( id , org . hamcrest . Matchers . is ( createResult . getId ( ) ) ) |
shouldReturnCountForGivenCriteriaQueryWithGivenIndexUsingCriteriaQuery ( ) { java . lang . String documentId = java . lang . String . valueOf ( java . util . concurrent . ThreadLocalRandom . current ( ) . nextLong ( ) ) . substring ( 1 , 6 ) ; com . github . vanroy . springdata . jest . SampleEntity sampleEntity = com ... | org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) ) |
testProcessRuntime_overrideWithJava ( ) { setupSourceDirectory ( "<vm>true</vm>" ) ; when ( stageMojo . getCompileTargetVersion ( ) ) . thenReturn ( "1.8" ) ; java . lang . String processedRuntime = new com . google . cloud . tools . maven . stage . AppEngineWebXmlStager . ConfigBuilder ( stageMojo ) . processRuntime (... | org . junit . Assert . assertEquals ( "java" , processedRuntime ) |
testRound4 ( ) { long tsInMS = 0L ; long tsInDay = org . apache . eagle . common . DateTimeUtil . roundDown ( Calendar . DATE , tsInMS ) ; "<AssertPlaceHolder>" ; java . lang . String str = org . apache . eagle . common . DateTimeUtil . millisecondsToHumanDateWithSeconds ( tsInMS ) ; System . out . println ( str ) ; } ... | org . junit . Assert . assertEquals ( 0L , tsInDay ) |
shouldValidateAndReturnFalseWhenTimestampGroupByPropertyUsedInEntity ( ) { final uk . gov . gchq . gaffer . store . schema . ViewValidator validator = new uk . gov . gchq . gaffer . store . schema . ViewValidator ( ) ; final uk . gov . gchq . gaffer . data . elementdefinition . view . View view = new uk . gov . gchq . ... | org . junit . Assert . assertFalse ( result . isValid ( ) ) |
testValidateWhitespaces ( ) { boolean result = org . oscm . validator . ADMValidator . containsOnlyValidIdChars ( "<sp>" ) ; "<AssertPlaceHolder>" ; } containsOnlyValidIdChars ( java . lang . String ) { if ( value == null ) { return true ; } java . util . regex . Matcher matcher = org . oscm . validator . ADMValidator ... | org . junit . Assert . assertTrue ( result ) |
shouldIgnoreWhenOutOfBoundsBottom ( ) { glass . drop ( new com . codenjoy . dojo . tetris . model . FigureImpl ( 0 , 0 , "#" , "#" ) , 0 , 0 ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { for ( int x = 0 ; x < ( size ) ; x ++ ) { for ( int y = 0 ; y < ( size ) ; y ++ ) { if ( ( isBusy ( x , y ) ) && ( ( data [ x ] [ y ] )... | org . junit . Assert . assertTrue ( glass . isEmpty ( ) ) |
testIndicatieOnderCurateleActueel ( ) { final java . util . Set < nl . bzk . brp . domain . algemeen . ZoekCriterium > zoekCriteria = new java . util . HashSet ( ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria1 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element ... | org . junit . Assert . assertEquals ( 1 , ids . size ( ) ) |
testUserName ( ) { org . eclipse . orion . server . core . metastore . UserInfo userInfo = new org . eclipse . orion . server . core . metastore . UserInfo ( ) ; java . lang . String userName = "test" ; userInfo . setUserName ( userName ) ; "<AssertPlaceHolder>" ; } getUserName ( ) { return userName ; } | org . junit . Assert . assertEquals ( userName , userInfo . getUserName ( ) ) |
testAnotherBannedCommandsWithBannedCommandWithExtra ( ) { org . bukkit . event . player . PlayerCommandPreprocessEvent e = new org . bukkit . event . player . PlayerCommandPreprocessEvent ( player , "/another_banned_command<sp>with<sp>extra<sp>stuff" ) ; world . bentobox . bentobox . listeners . BannedVisitorCommands b... | org . junit . Assert . assertTrue ( e . isCancelled ( ) ) |
testSpecEnableCountingDefault ( ) { com . hp . hpl . jena . rdf . model . Model m = com . epimorphics . jsonrdf . utils . ModelIOUtils . modelFromTurtle ( ":my<sp>a<sp>api:API;<sp>api:sparqlEndpoint<sp>:spoo" ) ; com . hp . hpl . jena . rdf . model . Resource root = m . createResource ( m . expandPrefix ( ":my" ) ) ; c... | org . junit . Assert . assertEquals ( Boolean . FALSE , s . getEnableCounting ( ) ) |
testVrsHashing ( ) { final int numCols = 1 ; final int size = 1000 ; final double base = 1.1 ; final int range = 20 ; org . hillview . table . api . ITable data = org . hillview . utils . TestTables . getIntTable ( size , numCols ) ; org . hillview . table . rows . VirtualRowSnapshot vrs = new org . hillview . table . ... | org . junit . Assert . assertEquals ( hash , vHash ) |
testPropertyIsGreaterThanShortLiteral ( ) { net . opengis . filter . v_1_1_0 . FilterType filterType = cswFilterDelegate . propertyIsGreaterThan ( propertyName , shortLiteral ) ; java . lang . String cqlText = org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . getInstance ( ) . getCqlText ... | org . junit . Assert . assertEquals ( propertyIsGreaterThan , cqlText ) |
parseEmpty ( ) { java . lang . Character expected = null ; io . robe . convert . xml . parsers . ParseChar parseChar = new io . robe . convert . xml . parsers . ParseChar ( ) ; java . lang . Character actual = parseChar . parse ( io . robe . convert . xml . ParserUtil . getParser ( "<char></char>" ) , null ) ; "<Assert... | org . junit . Assert . assertEquals ( expected , actual ) |
testMtoMString ( ) { org . apache . cxf . mime . TestMtom mtomPort = createPort ( org . apache . cxf . systest . mtom . ClientMtomXopTest . MTOM_SERVICE , org . apache . cxf . systest . mtom . ClientMtomXopTest . MTOM_PORT , org . apache . cxf . mime . TestMtom . class , true , false ) ; java . io . InputStream pre = t... | org . junit . Assert . assertNotNull ( r ) |
testLogin ( ) { try { indexPage . clickLogin ( ) ; loginPage . login ( "test-admin" , "password" ) ; "<AssertPlaceHolder>" ; profilePage . clickLogout ( ) ; } catch ( java . lang . Exception e ) { debugTest ( e ) ; org . junit . Assert . fail ( "Should<sp>display<sp>logged<sp>in<sp>user" ) ; } } getUsername ( ) { retur... | org . junit . Assert . assertEquals ( profilePage . getUsername ( ) , "test-admin" ) |
seriesVisibility_defaultVisibility_trueByDefault ( ) { @ com . vaadin . addon . charts . model . junittests . SuppressWarnings ( "serial" ) com . vaadin . addon . charts . model . AbstractSeries dataSeries = new com . vaadin . addon . charts . model . AbstractSeries ( ) { } ; "<AssertPlaceHolder>" ; } isVisible ( ) { i... | org . junit . Assert . assertTrue ( dataSeries . isVisible ( ) ) |
testGetVerifier ( ) { System . out . println ( "getVerifier" ) ; xades4j . verification . XadesVerificationProfile instance = new xades4j . verification . XadesVerificationProfile ( VerifierTestBase . validationProviderMySigs ) ; xades4j . verification . XadesVerifier result = instance . newVerifier ( ) ; "<AssertPlace... | org . junit . Assert . assertNotNull ( result ) |
testTextWithLegalNumericCharacterReferences ( ) { final java . lang . String text = "The<sp>value<sp>	<sp>is<sp>a<sp>legal<sp>numeric<sp>character<sp>reference." ; final boolean result = org . jivesoftware . openfire . nio . XMLLightweightParser . hasIllegalCharacterReferences ( text ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertFalse ( result ) |
testShuffleOnAllEqual ( ) { me . prettyprint . cassandra . connection . DynamicLoadBalancingPolicy dbp = new me . prettyprint . cassandra . connection . DynamicLoadBalancingPolicy ( ) ; me . prettyprint . cassandra . connection . LatencyAwareHClientPool poolWithScore2_1 = org . mockito . Mockito . mock ( me . prettypri... | org . junit . Assert . assertEquals ( 3 , foundHosts . size ( ) ) |
testMakingOfChildContainer ( ) { final com . picocontainer . MutablePicoContainer parent = createPicoContainer ( null ) ; com . picocontainer . MutablePicoContainer child = parent . makeChildContainer ( ) ; "<AssertPlaceHolder>" ; } makeChildContainer ( ) { return null ; } | org . junit . Assert . assertNotNull ( child ) |
getShortTestWithIndex ( ) { short data = 32765 ; byte [ ] bytes = new byte [ ] { ( ( byte ) ( ( data > > 8 ) & 255 ) ) , ( ( byte ) ( data & 255 ) ) } ; final java . nio . file . Path path = nextTempFile ( bytes ) ; final java . nio . channels . FileChannel read = java . nio . channels . FileChannel . open ( path , Sta... | org . junit . Assert . assertEquals ( data , result ) |
should_count_karma_if_vote_was_created_before_min_date ( ) { org . joda . time . DateTime antantonte = new org . joda . time . DateTime ( ) . minusDays ( 3 ) ; br . com . caelum . timemachine . TimeMachine . goTo ( antantonte ) . andExecute ( new br . com . caelum . timemachine . Block < org . mamute . model . Vote > (... | org . junit . Assert . assertTrue ( massiveVote . shouldCountKarma ( massiveVoter , author , acceptedVote ) ) |
testCreateUserNamespaceAuthorization ( ) { org . finra . herd . model . api . xml . UserNamespaceAuthorizationKey key = new org . finra . herd . model . api . xml . UserNamespaceAuthorizationKey ( USER_ID , NAMESPACE ) ; org . finra . herd . model . api . xml . UserNamespaceAuthorizationCreateRequest request = new org ... | org . junit . Assert . assertEquals ( userNamespaceAuthorization , response ) |
createCredentialsProviderTest ( ) { com . aliyuncs . auth . CredentialsProviderFactory factory = new com . aliyuncs . auth . CredentialsProviderFactory ( ) ; com . aliyuncs . auth . SystemPropertiesCredentialsProvider provider = new com . aliyuncs . auth . SystemPropertiesCredentialsProvider ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertTrue ( ( ( factory . createCredentialsProvider ( provider ) ) == provider ) ) |
testRegexMatchesSeussSpecial ( ) { java . util . List < java . lang . String > pattern = java . util . Arrays . asList ( "****" , "****" 0 , "li+e" ) ; java . util . List < java . lang . String > text = new java . util . ArrayList ( java . util . Arrays . asList ( "and" 2 , "****" , "****" 0 , "li+e" , "and" 1 , "in" ,... | org . junit . Assert . assertEquals ( pattern . get ( j ) , text . get ( ( i + j ) ) ) |
testRMFAILcommit1PC ( ) { javax . transaction . xa . XAResource theResource = new javax . transaction . xa . XAResource ( ) { @ com . hp . mwtests . ts . jta . xa . Override public void start ( javax . transaction . xa . Xid xid , int flags ) throws javax . transaction . xa . XAException { } @ com . hp . mwtests . ts .... | org . junit . Assert . assertTrue ( theTransaction . enlistResource ( theResource ) ) |
testExpiresFail ( ) { org . jboss . resteasy . security . doseta . Verifier verifier = new org . jboss . resteasy . security . doseta . Verifier ( ) ; org . jboss . resteasy . security . doseta . Verification verification = verifier . addNew ( ) ; verification . setRepository ( org . jboss . resteasy . tests . signatur... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testMaxHeapify ( ) { int [ ] testData = new int [ ] { 16 , 4 , 10 , 14 , 7 , 9 , 3 , 2 , 8 , 1 } ; int [ ] expectedData = new int [ ] { 16 , 14 , 10 , 8 , 7 , 9 , 3 , 2 , 4 , 1 } ; org . intelligentjava . algos . trees . utils . HeapUtils . maxHeapify ( testData , 1 ) ; for ( int i = 0 ; i < ( testData . length ) ; i +... | org . junit . Assert . assertTrue ( ( ( testData [ i ] ) == ( expectedData [ i ] ) ) ) |
toArray_ReturnsSetValue ( ) { java . util . List < org . pentaho . reporting . engine . classic . core . style . StyleKey > keys = org . pentaho . reporting . engine . classic . core . style . StyleKey . getDefinedStyleKeysList ( ) ; org . pentaho . reporting . engine . classic . core . style . StyleKey key = keys . ge... | org . junit . Assert . assertEquals ( org . pentaho . reporting . engine . classic . core . style . ElementStyleSheetTest . valueFor ( key ) , objects [ 0 ] ) |
loadPrivateKeyPKCS8 ( ) { java . security . PrivateKey privateKey = io . fabric8 . maven . docker . access . KeyStoreUtil . loadPrivateKey ( getFile ( "keys/pkcs8.pem" ) ) ; "<AssertPlaceHolder>" ; } getFile ( java . lang . String ) { return io . fabric8 . maven . docker . access . KeyStoreUtilTest . class . getResourc... | org . junit . Assert . assertNotNull ( privateKey ) |
loadOrganizationHistory_latestData ( ) { final org . oscm . domobjects . Organization org = runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . Organization > ( ) { @ org . oscm . billingservice . dao . Override public org . oscm . domobjects . Organization call ( ) throws org . oscm . billingse... | org . junit . Assert . assertEquals ( "newEmail@server.com" , organization . getEmail ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.