input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testRfcSyslog ( ) { loadSyslogConfiguration ( "/etc/syslogd-rfc-configuration.xml" ) ; startSyslogdJavaNet ( ) ; m_eventCounter . anticipate ( ) ; java . net . InetAddress address = java . net . InetAddress . getLocalHost ( ) ; byte [ ] bytes = "<34>1<sp>2010-08-19T22:14:15.000Z<sp>localhost<sp>-<sp>-<sp>-<sp>-<sp>foo... | org . junit . Assert . assertEquals ( 1 , m_eventCounter . getCount ( ) ) |
testRandomMediumAccess ( ) { for ( int i = 0 ; i < ( ( buffer . capacity ( ) ) - 2 ) ; i += 3 ) { int value = random . nextInt ( ) ; buffer . setMedium ( i , value ) ; } random . setSeed ( seed ) ; for ( int i = 0 ; i < ( ( buffer . capacity ( ) ) - 2 ) ; i += 3 ) { int value = ( ( random . nextInt ( ) ) << 8 ) > > 8 ;... | org . junit . Assert . assertEquals ( value , buffer . getMedium ( i ) ) |
testOnDistortedSine ( ) { int numPoints = 100 ; double [ ] xval = new double [ numPoints ] ; double [ ] yval = new double [ numPoints ] ; double xnoise = 0.1 ; double ynoise = 0.2 ; generateSineData ( xval , yval , xnoise , ynoise ) ; org . apache . commons . math . analysis . interpolation . LoessInterpolator li = new... | org . junit . Assert . assertTrue ( ( fitResidualSum < noisyResidualSum ) ) |
isUserNameAsEmailValid_shouldReturnTrueIfEmailValid ( ) { java . lang . String [ ] valids = new java . lang . String [ ] { "mkyong@yahoo.com" , "mkyong-100@yahoo.com" , "mkyong.100@yahoo.com" , "mkyong111@mkyong.com" , "mkyong-100@mkyong.net" , "mkyong.100@mkyong.com.au" , "mkyong@1.com" , "mkyong@gmail.com.com" , "mk@... | org . junit . Assert . assertTrue ( validator . isUserNameAsEmailValid ( email ) ) |
testFixT11AppMessageCracking ( ) { quickfix . fix50 . Email message = new quickfix . fix50 . Email ( ) ; message . getHeader ( ) . setString ( BeginString . FIELD , FixVersions . BEGINSTRING_FIXT11 ) ; message . getHeader ( ) . setString ( SenderCompID . FIELD , "SENDER" ) ; message . getHeader ( ) . setString ( Target... | org . junit . Assert . assertTrue ( ( ( messageCracked ) > 0 ) ) |
multi_classloader_context_Test ( ) { java . net . URL [ ] urls = new java . net . URL [ ] { new java . net . URL ( "file:test-resources/classpath/multi1/beans.jar" ) } ; java . net . URLClassLoader classLoader = new java . net . URLClassLoader ( urls ) ; org . openl . rules . project . instantiation . SimpleProjectEngi... | org . junit . Assert . assertNotNull ( instance ) |
_1_A$ ( ) { java . lang . String _1 = "foo" ; java . lang . Integer _2 = 123 ; java . lang . Long _3 = 456L ; java . lang . Boolean _4 = false ; com . m3 . scalaflavor4j . Tuple4 < java . lang . String , java . lang . Integer , java . lang . Long , java . lang . Boolean > target = com . m3 . scalaflavor4j . Tuple4 . ap... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testSetValidationMessage_emptyGroupId ( ) { enableUi ( ) ; "<AssertPlaceHolder>" ; verify ( dialogPage ) . setMessage ( "Provide<sp>Maven<sp>Group<sp>ID." , IMessageProvider . INFORMATION ) ; } setValidationMessage ( org . eclipse . jface . dialogs . DialogPage ) { org . eclipse . core . runtime . IStatus status = vali... | org . junit . Assert . assertFalse ( ui . setValidationMessage ( dialogPage ) ) |
testInvalidURL ( ) { org . apache . hive . jdbc . HiveDriver driver = new org . apache . hive . jdbc . HiveDriver ( ) ; java . sql . Connection conn = driver . connect ( "jdbc:derby://localhost:10000/default" , new java . util . Properties ( ) ) ; "<AssertPlaceHolder>" ; } connect ( org . apache . hadoop . hive . ql . ... | org . junit . Assert . assertNull ( conn ) |
testSave ( ) { java . lang . String fileName = "target/test-classes/example-app.json" ; java . lang . String appName = "example-app" ; long lifetime = 3600L ; java . lang . String queue = "default" ; try { int result = org . apache . hadoop . yarn . service . client . TestApiServiceClient . asc . actionSave ( fileName ... | org . junit . Assert . assertEquals ( org . apache . hadoop . yarn . service . client . EXIT_SUCCESS , result ) |
testParameterizedDoubleDelegation ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "R:<sp>F<true><sp>|<sp>F<false>;" ) ; _builder . newLine ( ) ; _builder . append ( "fragment<sp>F<X>:<sp>f+=ID;" ) ; _builder . newLine (... | org . junit . Assert . assertEquals ( expected , actual ) |
testIntronic ( ) { java . lang . String [ ] legacyVariantStrings = new java . lang . String [ ] { "XXX:IVS3+3C>T" , "XXX:IVS3-3C>T" } ; for ( java . lang . String legacyVariantString : legacyVariantStrings ) { de . charite . compbio . jannovar . hgvs . legacy . LegacyVariant variant = driver . parseLegacyChangeString (... | org . junit . Assert . assertEquals ( legacyVariantString , variant . toLegacyString ( ) ) |
testRemoveAll ( ) { remove ( "*:*" ) ; final long resize = query ( "*:*" ) ; "<AssertPlaceHolder>" ; } query ( java . lang . String ) { final io . vertigo . dynamo . search . model . SearchQuery searchQuery = io . vertigo . dynamo . search . model . SearchQuery . builder ( io . vertigo . dynamo . collections . ListFilt... | org . junit . Assert . assertEquals ( 0L , resize ) |
toString_A$ ( ) { java . lang . String actual = com . m3 . scalaflavor4j . Tuple3 . apply ( 1 , 2 , 3 ) . toString ( ) ; java . lang . String expected = "(1,2,3)" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "SInt(" + ( value ) ) + ")" ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testFindAllTestsToUpdate ( ) { il . co . topq . difido . model . execution . MachineNode machine = il . co . topq . report . business . elastic . ExecutionMetaDataGenerator . generateMachineNode ( 2 , 10 ) ; java . util . Set < il . co . topq . difido . model . execution . TestNode > tests = il . co . topq . report . b... | org . junit . Assert . assertEquals ( 20 , testsToUpdate . size ( ) ) |
testMaybe ( ) { io . vertx . core . Future < java . lang . String > fut = io . vertx . core . Future . future ( ) ; try { io . reactivex . Maybe justMe = io . reactivex . Maybe . just ( "me" ) ; io . reactivex . plugins . RxJavaPlugins . setOnMaybeAssembly ( ( single ) -> justMe ) ; io . reactivex . Maybe < java . lang... | org . junit . Assert . assertSame ( maybe , justMe ) |
testUpdaterBeforeStart ( ) { try ( org . apache . curator . test . TestingServer server = new org . apache . curator . test . TestingServer ( ) ) { server . start ( ) ; java . lang . String payload = "payload" ; org . apache . curator . RetryPolicy retryPolicy = new org . apache . curator . retry . RetryOneTime ( 1 ) ;... | org . junit . Assert . assertEquals ( payload , result . get ( ) ) |
debieraEliminarTipoColportor ( ) { mx . edu . um . mateo . colportor . test . TipoColportorControllerTest . log . debug ( "Debiera<sp>eliminar<sp>TipoColportor" ) ; mx . edu . um . mateo . colportor . model . TipoColportor tipoColportor = new mx . edu . um . mateo . colportor . model . TipoColportor ( "test3" , "A" ) ;... | org . junit . Assert . assertNotNull ( tipoColportor . getId ( ) ) |
cipherStreamEncryptDecrypt ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>cipherStreamEncryptDecrypt" ) ; javax . crypto . Cipher c = org . ccnx . ccn . io . CCNSecureInputStreamTest . basic . keys . getSegmentEncryptionCipher ( org . ccnx . ccn . io . CCNSecureInputStreamTest . ba... | org . junit . Assert . assertArrayEquals ( input , output ) |
compareNumberOfMatchingPatterns ( ) { org . springframework . messaging . Message < ? > message = ch . rasc . wampspring . method . DestinationPatternsMessageConditionTest . messageTo ( "/foo" ) ; ch . rasc . wampspring . method . DestinationPatternsMessageCondition c1 = ch . rasc . wampspring . method . DestinationPat... | org . junit . Assert . assertEquals ( 1 , match1 . compareTo ( match2 , message ) ) |
testGetStatus ( ) { when ( applicationEntityService . getByUUIDOrAppId ( anyString ( ) , anyString ( ) ) ) . thenReturn ( generateRunningEntity ( ) ) ; org . apache . eagle . app . service . ApplicationAction applicationAction = mock ( org . apache . eagle . app . service . ApplicationAction . class ) ; org . powermock... | org . junit . Assert . assertEquals ( ApplicationEntity . Status . RUNNING , status ) |
testDefaultWithGzipFile ( ) { java . io . BufferedReader reader = gzbrf . create ( new org . springframework . core . io . FileSystemResource ( de . langmi . spring . batch . examples . readers . file . gzip . GZipBufferedReaderFactoryTest . PATH_TO_COMPRESSED_TEST_FILE ) , java . nio . charset . Charset . defaultChars... | org . junit . Assert . assertNotNull ( reader ) |
testDrawWithNullLegendLabels ( ) { org . jfree . data . general . DefaultPieDataset dataset = new org . jfree . data . general . DefaultPieDataset ( ) ; dataset . setValue ( "L1" , 12.0 ) ; dataset . setValue ( "L2" , 11.0 ) ; org . jfree . chart . JFreeChart chart = org . jfree . chart . ChartFactory . createPieChart ... | org . junit . Assert . assertTrue ( success ) |
testPutUndefined ( ) { com . eclipsesource . v8 . utils . V8Map < java . lang . Object > map = new com . eclipsesource . v8 . utils . V8Map < java . lang . Object > ( ) ; com . eclipsesource . v8 . V8Object v1 = new com . eclipsesource . v8 . V8Object ( v8 ) ; map . put ( v1 , com . eclipsesource . v8 . V8 . getUndefin... | org . junit . Assert . assertEquals ( com . eclipsesource . v8 . V8 . getUndefined ( ) , map . get ( v1 ) ) |
testToStringEmptyConfigs ( ) { org . eclipse . kura . core . net . NetInterfaceAddressConfigImpl value = createConfig ( ) ; value . setNetConfigs ( new java . util . ArrayList < org . eclipse . kura . net . NetConfig > ( ) ) ; java . lang . String expected = "" ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . S... | org . junit . Assert . assertEquals ( expected , value . toString ( ) ) |
messageSentToQueueSuccessfully ( ) { queue . addMessage ( new fish . payara . notification . hipchat . HipchatMessage ( new fish . payara . notification . hipchat . HipchatNotificationEvent ( ) , "subject" , "hello<sp>world" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return mappings . size ( ) ; } | org . junit . Assert . assertThat ( queue . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
test_equal ( ) { org . omg . CORBA . Any outAny = setup . getClientOrb ( ) . create_any ( ) ; outAny . insert_string ( "foo" ) ; org . omg . CORBA . Any inAny = setup . getClientOrb ( ) . create_any ( ) ; inAny . insert_string ( "bar" ) ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) ... | org . junit . Assert . assertFalse ( outAny . equal ( inAny ) ) |
testGetIssuer ( ) { "<AssertPlaceHolder>" ; } getIssuer ( ) { return issuer ; } | org . junit . Assert . assertEquals ( issuer , fixture . getIssuer ( ) ) |
shutdownOk ( ) { final int port = org . metricssampler . TCPControllerTestUtil . setupServer ( "shutdown" , "ok" ) ; final java . lang . String response = testee . shutdown ( "localhost" , port ) ; "<AssertPlaceHolder>" ; } shutdown ( java . lang . String , int ) { try { execute ( host , port , "shutdown" ) ; return "S... | org . junit . Assert . assertEquals ( "Stopped" , response ) |
emptyConstructorSucceed ( ) { tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . X509Attestation x509Attestation = mockit . Deencapsulation . newInstance ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . X509Attestation . class ) ; "<AssertPla... | org . junit . Assert . assertNotNull ( x509Attestation ) |
insertNotMatchParameterTest ( ) { java . lang . String sql = ( "insert<sp>into<sp>" + ( normaltblTableName ) ) + "<sp>(id,floatCol)<sp>values(?,?)" ; java . util . List < java . lang . Object > param = new java . util . ArrayList < java . lang . Object > ( ) ; param . add ( gmt ) ; try { andorUpdateData ( sql , param )... | org . junit . Assert . assertNotNull ( ex ) |
testBijhoudingspartijHistorisch ( ) { 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 ( ) ) |
testGetTemplatesByClassPK ( ) { com . liferay . dynamic . data . mapping . model . DDMStructure ddmStructure = addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMTemplateServiceTest . _recordSetClassNameId , com . liferay . portal . kernel . util . StringUtil . randomString ( ) ) ; java . lan... | org . junit . Assert . assertEquals ( templates . toString ( ) , 3 , templates . size ( ) ) |
getHostnameIsCorrect ( ) { final java . lang . String iotHubHostname = "test.iothub" ; final java . lang . String deviceId = "test-deviceid" ; final java . lang . String hostname = "test-hostname" ; new mockit . NonStrictExpectations ( ) { { mockIotHubUri . getHostname ( ) ; result = hostname ; } } ; com . microsoft . ... | org . junit . Assert . assertThat ( testHostname , org . hamcrest . CoreMatchers . is ( expectedHostname ) ) |
readSimpleString ( ) { this . request . setContentType ( new org . springframework . http . MediaType ( "application" , "x-amf" ) . toString ( ) ) ; this . request . setContent ( serializeToByteArray ( "foo" ) ) ; org . springframework . http . HttpInputMessage inputMessage = new org . springframework . http . server .... | org . junit . Assert . assertEquals ( "foo" , result ) |
toArrayWithZeros ( ) { int size = 10 ; java . lang . Integer [ ] control = new java . lang . Integer [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { control [ i ] = ( ( i % 2 ) == 0 ) ? i : 0 ; } edu . ucla . sspace . util . SparseIntArray arr = new edu . ucla . sspace . util . SparseIntArray ( ) ; for ( int i = 0 ; i... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( control , test ) ) |
testGetSortingInfo ( ) { org . sagebionetworks . repo . model . table . SortItem foo = new org . sagebionetworks . repo . model . table . SortItem ( ) ; foo . setColumn ( "foo" ) ; foo . setDirection ( SortDirection . ASC ) ; org . sagebionetworks . repo . model . table . SortItem barbar = new org . sagebionetworks . r... | org . junit . Assert . assertEquals ( expected , results ) |
testSimpleP ( ) { java . util . List < ch . qos . logback . core . pattern . parser . Token > tl = new ch . qos . logback . core . pattern . parser . TokenStream ( "%(hello<sp>%class{.4?})" ) . tokenize ( ) ; java . util . List < ch . qos . logback . core . pattern . parser . Token > witness = new java . util . ArrayLi... | org . junit . Assert . assertEquals ( witness , tl ) |
testParseUrlsAddressNull ( ) { "<AssertPlaceHolder>" ; } parseURLs ( java . lang . String , java . util . Map ) { if ( ( address == null ) || ( ( address . length ( ) ) == 0 ) ) { return null ; } java . lang . String [ ] addresses = Constants . REGISTRY_SPLIT_PATTERN . split ( address ) ; if ( ( addresses == null ) || ... | org . junit . Assert . assertNull ( com . alibaba . dubbo . common . utils . UrlUtils . parseURLs ( null , null ) ) |
hashIndexTable_remove_deletesMapping_withIndexAbove127 ( ) { com . eclipsesource . json . JsonObject . HashIndexTable indexTable = new com . eclipsesource . json . JsonObject . HashIndexTable ( ) ; indexTable . add ( "name" , 142 ) ; indexTable . remove ( 142 ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) {... | org . junit . Assert . assertEquals ( ( - 1 ) , indexTable . get ( "name" ) ) |
intersectSelf ( ) { org . junit . tests . manipulation . FilterTest . NamedFilter a = new org . junit . tests . manipulation . FilterTest . NamedFilter ( "a" ) ; "<AssertPlaceHolder>" ; } intersect ( org . junit . runner . manipulation . Filter ) { return second ; } | org . junit . Assert . assertSame ( a , a . intersect ( a ) ) |
testRemove ( ) { com . liferay . changeset . model . ChangesetEntry newChangesetEntry = addChangesetEntry ( ) ; _persistence . remove ( newChangesetEntry ) ; com . liferay . changeset . model . ChangesetEntry existingChangesetEntry = _persistence . fetchByPrimaryKey ( newChangesetEntry . getPrimaryKey ( ) ) ; "<AssertP... | org . junit . Assert . assertNull ( existingChangesetEntry ) |
jsonArraySupport ( ) { addVariable ( "array" , new org . json . JSONArray ( "[1,<sp>2]" ) ) ; int result = evaluate ( "${array[0]<sp>+<sp>array[1]}" , org . apache . shindig . expressions . Integer . class ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . String , java . lang . Class ) { javax . el . ValueExpressi... | org . junit . Assert . assertEquals ( 3 , result ) |
shouldClearExistingFacets ( ) { com . couchbase . client . java . search . SearchQuery p = new com . couchbase . client . java . search . SearchQuery ( null , null ) . addFacet ( "A" , com . couchbase . client . java . search . facet . SearchFacet . term ( "field1" , 1 ) ) . clearFacets ( ) . addFacet ( "B" , com . cou... | org . junit . Assert . assertEquals ( expected , result ) |
shouldReturnFalseForOpenBracket ( ) { boolean start = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( "(" , 0 ) ; "<AssertPlaceHolder>" ; } isWordStart ( java . lang . String , int ) { checkNotNull ( entityName ) ; int length = entityName . length ( ) ; checkElementIndex ( inde... | org . junit . Assert . assertEquals ( false , start ) |
testSerialization2 ( ) { org . jfree . chart . renderer . xy . XYBarRenderer r1 = new org . jfree . chart . renderer . xy . XYBarRenderer ( ) ; r1 . setPositiveItemLabelPositionFallback ( new org . jfree . chart . labels . ItemLabelPosition ( ) ) ; org . jfree . chart . renderer . xy . XYBarRenderer r2 = ( ( org . jfre... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . expando . kernel . model . ExpandoTable > expandoTables = _persistence . fetchByPrimaryKe... | org . junit . Assert . assertTrue ( expandoTables . isEmpty ( ) ) |
testHandleSetxpanded_expand ( ) { org . eclipse . rap . rwt . testfixture . internal . Fixture . fakePhase ( PhaseId . PROCESS_ACTION ) ; handler . handleSet ( new org . eclipse . rap . json . JsonObject ( ) . add ( "expanded" , true ) ) ; "<AssertPlaceHolder>" ; } getExpanded ( ) { checkWidget ( ) ; return expanded ; ... | org . junit . Assert . assertTrue ( item . getExpanded ( ) ) |
testLocalTime ( ) { org . joda . time . LocalTime original = new org . joda . time . LocalTime ( ) ; com . google . gson . JsonElement element = pt . ist . fenixframework . util . JsonConverter . getJsonFor ( original ) ; System . out . println ( ( "LocalTime:<sp>" + ( element . toString ( ) ) ) ) ; org . joda . time .... | org . junit . Assert . assertEquals ( original , other ) |
testComputeIndexMapStart ( ) { int [ ] expectedIndexMap = new int [ ] { - 1 , 2 , 3 , 4 } ; org . apache . avro . Schema designSchema = org . apache . avro . SchemaBuilder . builder ( ) . record ( "Record" ) . prop ( DiSchemaConstants . TALEND6_DYNAMIC_COLUMN_POSITION , "0" ) . prop ( SchemaConstants . INCLUDE_ALL_FIEL... | org . junit . Assert . assertArrayEquals ( expectedIndexMap , actualIndexMap ) |
skipSagaEndedEvent_IfGlobalTxAlreadyFailed ( ) { java . lang . String localTxId1 = java . util . UUID . randomUUID ( ) . toString ( ) ; events . add ( eventOf ( org . apache . servicecomb . pack . alpha . core . SagaStartedEvent , localTxId1 ) ) ; events . add ( eventOf ( org . apache . servicecomb . pack . alpha . cor... | org . junit . Assert . assertThat ( events . size ( ) , org . hamcrest . core . Is . is ( 2 ) ) |
includeExcludeRule3Test ( ) { java . lang . String code = "class<sp>A{isA<sp>T1;}trait<sp>T1{isA<sp>T2<sp><-show()>;void<sp>test(){/*T1*/}<sp>}trait<sp>T2{}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { resu... | org . junit . Assert . assertTrue ( result ) |
testGetUserHomeDir ( ) { "<AssertPlaceHolder>" ; } getUserHomeDir ( ) { final org . esa . beam . util . File home = org . esa . beam . util . SystemUtils . getBeamHomeDir ( ) ; if ( home . exists ( ) ) { try { final java . lang . String context = org . esa . beam . util . SystemUtils . getApplicationContextId ( ) ; fin... | org . junit . Assert . assertNotNull ( org . esa . beam . util . SystemUtils . getUserHomeDir ( ) ) |
testMissingParameter ( ) { final net . violet . platform . datamodel . Lang frLang = getSiteFrLang ( ) ; final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . news . Create ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplic... | org . junit . Assert . assertNotNull ( theResult ) |
importSettings_ModelReinit ( ) { lcc . importSettings ( ) ; verify ( lcc , times ( 1 ) ) . initResolvedSettings ( ) ; "<AssertPlaceHolder>" ; } getFile ( ) { return file ; } | org . junit . Assert . assertNull ( model . getFile ( ) ) |
testUserCanConfigureAJob ( ) { com . sonyericsson . hudson . plugins . gerrit . trigger . GerritServer gerritServer = new com . sonyericsson . hudson . plugins . gerrit . trigger . GerritServer ( PluginImpl . DEFAULT_SERVER_NAME ) ; com . sonymobile . tools . gerrit . gerritevents . mock . SshdServerMock . configureFor... | org . junit . Assert . assertEquals ( "theOtherServer" , serverName ) |
testConvert ( ) { java . lang . Long personId = 2L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long educationTypeId = 3L ; org . lnu . is . domain . education . type . EducationType educationType = new org . lnu . i... | org . junit . Assert . assertEquals ( expected , actual ) |
createFormField ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . module . tests . FORM_FIELD ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . openUpdateMavenProjectDialog ( proj... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
tabletDirWithTableId ( ) { java . lang . String basePath = fs . getDefaultVolume ( ) . getBasePath ( ) ; java . lang . String scheme = fs . getDefaultVolume ( ) . getFileSystem ( ) . getUri ( ) . toURL ( ) . getProtocol ( ) ; org . apache . hadoop . fs . Path expectedBase = new org . apache . hadoop . fs . Path ( ( ( s... | org . junit . Assert . assertEquals ( new org . apache . hadoop . fs . Path ( expectedBase , pathToTest ) , fullPath ) |
testBuildWithDisabledDefaultConstraintsAndOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . wave . type . WaveType context = new org . lnu . is . domain . wave . type . WaveType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . Ord... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
test_encode_decode ( ) { final de . metas . fresh . ordercheckup . OrderCheckupBarcode barcode = de . metas . fresh . ordercheckup . OrderCheckupBarcode . ofC_OrderLine_ID ( 12345 ) ; final de . metas . fresh . ordercheckup . OrderCheckupBarcode barcodeDecoded = de . metas . fresh . ordercheckup . OrderCheckupBarcode .... | org . junit . Assert . assertEquals ( barcode , barcodeDecoded ) |
testConfiguredProxyAvoidProxyNonProxyHosts ( ) { avoidProxy = true ; httpProxyHost = "foo" ; httpNonProxyHosts = "www.google.com|*.yahoo.com" ; java . lang . String pac = makeProxyPAC ( ) ; java . lang . String expected = "function<sp>FindProxyForURL(url,<sp>host)<sp>{<sp>" + ( ( ( "if<sp>(shExpMatch(host,<sp>'www.goog... | org . junit . Assert . assertEquals ( expected , pac ) |
testCompareDynAny ( ) { java . lang . String msg ; java . math . BigDecimal fixedVal ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynFixed dynAny = null ; org . omg . DynamicAny . DynFixed dynAny2 = null ; tc = orb . create_fixed_tc ( ( ( short ) ( 2 ) ) , ( (... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
completeSegmentsEmitted ( ) { okio . Buffer sink = new okio . Buffer ( ) ; okio . BufferedSink bufferedSink = new okio . RealBufferedSink ( sink ) ; bufferedSink . writeUtf8 ( okio . TestUtil . repeat ( 'a' , ( ( Segment . SIZE ) * 3 ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return pos ; } | org . junit . Assert . assertEquals ( ( ( Segment . SIZE ) * 3 ) , sink . size ( ) ) |
testSemanticPredicateAnalysisStackOverflow ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( "\n" + "options<sp>{\n" ) + "<sp>backtrack=true;\n" ) + "}\n" ) + "\n" ) + "main<sp>:<sp>(\'x\'*)*;\n" ) ; boolean success = rawGenerateAndBuildRecognizer ( "T.g" , grammar , "TParser" , "TLexer" , false ) ; "<... | org . junit . Assert . assertTrue ( success ) |
testIoListToString_large1 ( ) { final com . ericsson . otp . erlang . OtpErlangObject input = org . erlide . util . erlang . OtpErlang . mkList ( new com . ericsson . otp . erlang . OtpErlangString ( "hej" ) , new com . ericsson . otp . erlang . OtpErlangString ( "hoj" ) ) ; final java . lang . String result = org . er... | org . junit . Assert . assertEquals ( expected , result ) |
getsTooltipOnButton ( ) { org . eclipse . swtbot . swt . finder . widgets . SWTBotToolbarRadioButton button = bot . toolbarRadioButtonWithTooltip ( "SWT.RADIO" ) ; java . lang . String toolTipText = button . getToolTipText ( ) ; "<AssertPlaceHolder>" ; } getToolTipText ( ) { return syncExec ( new org . eclipse . swtbot... | org . junit . Assert . assertEquals ( "SWT.RADIO" , toolTipText ) |
testGetTasksOwnedByExpirationDateWithUserStatusDateOneTaskCompleted ( ) { java . lang . String str = "(with<sp>(new<sp>Task())<sp>{<sp>priority<sp>=<sp>55,<sp>taskData<sp>=<sp>(with(<sp>new<sp>TaskData())<sp>{<sp>expirationTime<sp>=<sp>new<sp>Date(<sp>10000000<sp>),<sp>}<sp>),<sp>" ; str += "peopleAssignments<sp>=<sp>(... | org . junit . Assert . assertEquals ( 0 , tasks . size ( ) ) |
getSourceMessageWithLastTimeNUTest ( ) { final long sourceUpdateTime = ( java . lang . System . currentTimeMillis ( ) ) / 1000 ; final net . violet . platform . datamodel . Source source = new net . violet . platform . datamodel . mock . SourceMock ( 8205 , "air.paris.today" , 9 , sourceUpdateTime ) ; final long theLas... | org . junit . Assert . assertNull ( theMessage ) |
testBreadthFirstSearch ( ) { edu . illinois . cs . cogcomp . core . search . GraphSearch < edu . illinois . cs . cogcomp . core . datastructures . Pair < java . lang . Integer , java . lang . Integer > > dfs = new edu . illinois . cs . cogcomp . core . search . BreadthFirstSearch ( ) ; edu . illinois . cs . cogcomp . c... | org . junit . Assert . assertEquals ( result , new edu . illinois . cs . cogcomp . core . datastructures . Pair ( 4 , 0 ) ) |
testViewReboot ( ) { org . openntf . domino . Session sess = org . openntf . domino . utils . Factory . getSession ( SessionType . CURRENT ) ; org . openntf . domino . View vw = sess . getDatabase ( "log.nsf" ) . getViews ( ) . get ( 0 ) ; org . openntf . domino . View ret = test ( vw , true ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertFalse ( ( vw == ret ) ) |
shouldReturnZeroAsVersionWhenEmptyDirectoryGiven ( ) { org . cognitor . cassandra . migration . MigrationRepository repository = new org . cognitor . cassandra . migration . MigrationRepository ( "cassandra/migrationtest/empty" ) ; "<AssertPlaceHolder>" ; } getLatestVersion ( ) { if ( migrationScripts . isEmpty ( ) ) {... | org . junit . Assert . assertThat ( repository . getLatestVersion ( ) , org . hamcrest . core . Is . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
checkComboBox ( ) { com . vaadin . testbench . elements . ComboBoxElement elem = $ ( com . vaadin . testbench . elements . ComboBoxElement . class ) . get ( 0 ) ; java . lang . String expected = ComponentElementGetValue . TEST_STRING_VALUE ; java . lang . String actual = elem . getValue ( ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( expected , actual ) |
updateProductReview_titleMaxLength ( ) { org . oscm . internal . review . POServiceReview presentationObject = createPresentationObject ( ) ; presentationObject . setTitle ( longText ( ADMValidator . LENGTH_NAME ) ) ; org . oscm . domobjects . ProductReview domainObject = new org . oscm . domobjects . ProductReview ( )... | org . junit . Assert . assertEquals ( ADMValidator . LENGTH_NAME , domainObject . getTitle ( ) . length ( ) ) |
testQueryWithFacets ( ) { java . lang . String table = "testQueryWithFacets" ; org . apache . blur . thrift . TableGen . define ( table ) . cols ( "test" , "string:facet" ) . addRow ( 20 , "r1" , "rec###" , "value-###" ) . build ( getClient ( ) ) ; org . apache . blur . thrift . QueryBuilder qb = org . apache . blur . ... | org . junit . Assert . assertEquals ( 1 , resultsRow . getTotalResults ( ) ) |
testGetCanonicalId ( ) { expect ( mockConnection . getBlobStore ( ) ) . andReturn ( mockStore ) . times ( 3 ) ; expect ( mockStore . getId ( ) ) . andReturn ( de . fiz . akubra . hdfs . HDFSBlobTest . blobStoreUri ) . times ( 2 ) ; expect ( mockConnection . getFileSystem ( ) ) . andReturn ( mockFs ) ; replay ( mockConn... | org . junit . Assert . assertEquals ( de . fiz . akubra . hdfs . HDFSBlobTest . blobUri , b . getCanonicalId ( ) ) |
testEncodingDecoding ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>testEncodingDecoding" ) ; byte [ ] [ ] arr = new byte [ 4 ] [ ] ; arr [ 0 ] = baseName . getBytes ( ) ; arr [ 1 ] = subName1 . getBytes ( ) ; arr [ 2 ] = document1 . getBytes ( ) ; arr [ 3 ] = document3 ; org . ccn... | org . junit . Assert . assertNotNull ( name ) |
testWsPort_shouldBeExportedWithCorrectId ( ) { org . openengsb . core . util . DefaultOsgiUtilsService utilsService = new org . openengsb . core . util . DefaultOsgiUtilsService ( getBundleContext ( ) ) ; org . openengsb . core . api . remote . OutgoingPort serviceWithId = utilsService . getServiceWithId ( org . openen... | org . junit . Assert . assertNotNull ( serviceWithId ) |
testByteObjNull ( ) { java . lang . Class < com . j256 . ormlite . field . types . ByteObjectTypeTest . LocalByteObj > clazz = com . j256 . ormlite . field . types . ByteObjectTypeTest . LocalByteObj . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . ByteObjectTypeTest . LocalByteObj , ... | org . junit . Assert . assertEquals ( 1 , dao . create ( new com . j256 . ormlite . field . types . ByteObjectTypeTest . LocalByteObj ( ) ) ) |
ruleIsIntroducedAndEvaluated ( ) { org . junit . rules . TestRuleTest . wasRun = false ; org . junit . runner . JUnitCore . runClasses ( org . junit . rules . TestRuleTest . ExampleTest . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner . JUnitCore . runClasses ( ... | org . junit . Assert . assertTrue ( org . junit . rules . TestRuleTest . wasRun ) |
existingDocumentTerminalFromUI ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "xwiki" , java . util . Arrays . asList ( "Main" ) , "WebHome" ) ; com . xpn . xwiki . doc . XWikiDocument document = mock ( com . xpn . xwiki . doc . XW... | org . junit . Assert . assertNull ( result ) |
builds_should_never_be_building ( ) { fr . norad . visuwall . api . domain . SoftwareProjectId softwareProjectId = new fr . norad . visuwall . api . domain . SoftwareProjectId ( "projectId" ) ; boolean isBuilding = sonar . isBuilding ( softwareProjectId , 1 ) ; "<AssertPlaceHolder>" ; } isBuilding ( fr . norad . visuwa... | org . junit . Assert . assertFalse ( isBuilding ) |
testSetBottomId ( ) { edge . setBottomId ( 100 ) ; "<AssertPlaceHolder>" ; } getBottomId ( ) { return this . f1 ; } | org . junit . Assert . assertEquals ( 100 , ( ( long ) ( edge . getBottomId ( ) ) ) ) |
testTargetNullForStaticMethod ( ) { final spoon . reflect . factory . Factory factory = spoon . testing . utils . ModelUtils . build ( spoon . test . invocations . testclasses . Bar . class ) ; final spoon . reflect . declaration . CtClass < spoon . test . invocations . testclasses . Bar > barClass = factory . Class ( ... | org . junit . Assert . assertNull ( invocation . getTarget ( ) ) |
testSpecEnableCountingNo ( ) { com . hp . hpl . jena . rdf . model . Model m = com . epimorphics . jsonrdf . utils . ModelIOUtils . modelFromTurtle ( ":my<sp>a<sp>api:API;<sp>elda:enableCounting<sp>'no';<sp>api:sparqlEndpoint<sp>:spoo" ) ; com . hp . hpl . jena . rdf . model . Resource root = m . createResource ( m . e... | org . junit . Assert . assertEquals ( Boolean . FALSE , s . getEnableCounting ( ) ) |
printWeekdaysZH ( ) { net . time4j . format . TextWidth textWidth = net . time4j . format . TextWidth . ABBREVIATED ; net . time4j . format . OutputContext outputContext = net . time4j . format . OutputContext . FORMAT ; net . time4j . format . CalendarText instance = net . time4j . format . CalendarText . getInstance ... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( "" ) ) |
testOutputInsertAndDelete ( ) { org . talend . components . snowflake . SnowflakeConnectionTableProperties props = populateOutput ( 100 ) ; readAndCheckRows ( props , 100 ) ; handleRows ( makeRows ( 100 ) , props , TSnowflakeOutputProperties . OutputAction . DELETE ) ; "<AssertPlaceHolder>" ; } readRows ( org . talend ... | org . junit . Assert . assertEquals ( 0 , readRows ( props ) . size ( ) ) |
testGetAlerts ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/AlertServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . AlertService alertService = argusService . getAlertService ( ) ; java . util . ... | org . junit . Assert . assertEquals ( expected , result ) |
testSerialization1 ( ) { org . jfree . chart . plot . MeterPlot p1 = new org . jfree . chart . plot . MeterPlot ( null ) ; p1 . setDialBackgroundPaint ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . red , 3.0F , 4.0F , java . awt . Color . blue ) ) ; p1 . setDialOutlinePaint ( new java . awt . Gra... | org . junit . Assert . assertEquals ( p1 , p2 ) |
testOneFalseFilter ( ) { com . northconcepts . eventbus . EventFilter filter = new com . northconcepts . eventbus . filter . OrFilter ( FALSE_FILTER ) ; "<AssertPlaceHolder>" ; } allow ( com . northconcepts . eventbus . Event , java . lang . Object ) { return true ; } | org . junit . Assert . assertFalse ( filter . allow ( event , listener ) ) |
testCalcNormalizedEdgeDistance ( ) { com . graphhopper . util . DistanceCalc2D distanceCalc = new com . graphhopper . util . DistanceCalc2D ( ) ; double distance = distanceCalc . calcNormalizedEdgeDistance ( 0 , 10 , 0 , 0 , 10 , 10 ) ; "<AssertPlaceHolder>" ; } calcNormalizedEdgeDistance ( double , double , double , d... | org . junit . Assert . assertEquals ( 50 , distance , 0 ) |
getCardsStatusByBoardOnDoubleSnapshotTest ( ) { io . lavagna . service . Map < java . lang . Long , io . lavagna . service . Map < io . lavagna . service . ColumnDefinition , java . lang . Long > > results = statisticsService . getCardsStatusByBoard ( board . getId ( ) , oneMonthAgo ) ; "<AssertPlaceHolder>" ; snapshot... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
shouldValidateInstallmentSchedule ( ) { java . util . List < org . mifos . accounts . loan . util . helpers . RepaymentScheduleInstallment > installments = new java . util . ArrayList < org . mifos . accounts . loan . util . helpers . RepaymentScheduleInstallment > ( ) ; org . mifos . platform . validations . Errors ex... | org . junit . Assert . assertThat ( errors , org . hamcrest . Matchers . is ( expectedErrors ) ) |
testEmptyString ( ) { java . lang . String emptyString = "" ; org . openscience . cdk . io . MDLReader reader = new org . openscience . cdk . io . MDLReader ( new java . io . StringReader ( emptyString ) , org . openscience . cdk . io . IChemObjectReader . Mode . STRICT ) ; org . openscience . cdk . interfaces . IAtomC... | org . junit . Assert . assertNull ( mol ) |
testBackwardsCompatibleUnsaltedAuthenticationInfo ( ) { org . apache . shiro . authc . credential . HashedCredentialsMatcher matcher = new org . apache . shiro . authc . credential . HashedCredentialsMatcher ( org . apache . shiro . crypto . hash . Sha1Hash . ALGORITHM_NAME ) ; final java . lang . String username = "us... | org . junit . Assert . assertTrue ( matcher . doCredentialsMatch ( token , account ) ) |
testFindFromBundleInNoRegion ( ) { this . candidates . add ( serviceReference ( org . eclipse . equinox . region . internal . tests . hook . RegionServiceFindHookTests . BUNDLE_A ) ) ; org . osgi . framework . Bundle stranger = createBundle ( "stranger" ) ; this . bundleFindHook . find ( stranger . getBundleContext ( )... | org . junit . Assert . assertEquals ( 0 , this . candidates . size ( ) ) |
deleteProject ( ) { java . io . File dataDir = tempDir . getRoot ( ) ; when ( settings . getDocumentrDataDir ( ) ) . thenReturn ( dataDir ) ; de . blizzy . documentr . repository . ProjectRepositoryManagerFactory repoManagerFactory = new de . blizzy . documentr . repository . ProjectRepositoryManagerFactory ( ) ; org .... | org . junit . Assert . assertTrue ( globalRepoManager . listProjects ( ) . isEmpty ( ) ) |
testCustomTerminalOperator_Sum ( ) { int sum = com . annimon . stream . Stream . of ( 1 , 2 , 3 , 4 , 5 ) . custom ( new com . annimon . stream . CustomOperators . Sum ( ) ) ; "<AssertPlaceHolder>" ; } custom ( com . annimon . stream . function . Function ) { com . annimon . stream . Objects . requireNonNull ( function... | org . junit . Assert . assertEquals ( 15 , sum ) |
testGetAxesDistLabelsOk ( ) { final net . sf . latexdraw . model . api . shape . Point pt = ShapeFactory . INST . createPoint ( 10.0 , 11.0 ) ; init4getAxes ( ) . setDistLabels ( pt ) ; "<AssertPlaceHolder>" ; } getDistLabels ( ) { return ShapeFactory . INST . createPoint ( getDistLabelsX ( ) , getDistLabelsY ( ) ) ; } | org . junit . Assert . assertEquals ( pt , shape . getDistLabels ( ) ) |
testBondOrderAlipF ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( ALIPHATIC_ORDER , 2 ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; when ( bond . isAromatic ( ) )... | org . junit . Assert . assertFalse ( expr . matches ( bond ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.