input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
itShouldNotBeCreatedWhenThereAreNoActiveSubSenders ( ) { io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub pool = new io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub ( ) ; io . datakernel . rpc . client . sender . RpcStrategy roundRobin = roundRobin ( servers ... | org . junit . Assert . assertNull ( roundRobin . createSender ( pool ) ) |
testSplitForTopic ( ) { org . apache . beam . sdk . io . jms . JmsIO . Read read = org . apache . beam . sdk . io . jms . JmsIO . read ( ) . withTopic ( org . apache . beam . sdk . io . jms . JmsIOTest . TOPIC ) ; org . apache . beam . sdk . options . PipelineOptions pipelineOptions = org . apache . beam . sdk . option... | org . junit . Assert . assertEquals ( 1 , splits . size ( ) ) |
testTrafficMarkingSerializer ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . flowspec . rev180329 . bgp . rib . route . attributes . extended . communities . extended . community . TrafficMarkingExtendedCommunityCase trafficMarking = new org . opendaylight . yang... | org . junit . Assert . assertArrayEquals ( org . opendaylight . protocol . bgp . flowspec . extended . communities . FSExtendedCommunitiesTest . TRAFFIC_MARKING , output . array ( ) ) |
testGetTopIndex_OnItemAdd ( ) { org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 20 , 3 ) ; grid . setTopIndex ( 12 ) ; new org . eclipse . nebula . widgets . grid . GridItem ( grid , org . eclipse . swt . SWT . NONE , 0 ) ; "<AssertPlaceHolder>" ; } getTopIndex ( ) { checkWidget ( ) ; ... | org . junit . Assert . assertEquals ( 9 , grid . getTopIndex ( ) ) |
predicateSanityTests ( ) { final org . apache . commons . collections4 . Predicate < ? > predicate = generatePredicate ( ) ; "<AssertPlaceHolder>" ; } generatePredicate ( ) { return truePredicate ( ) ; } | org . junit . Assert . assertNotNull ( predicate ) |
testCheckOpenOrders_NoMocOrders ( ) { java . util . List < com . sumzerotrading . broker . order . TradeOrder > orders = new java . util . ArrayList ( ) ; orders . add ( new com . sumzerotrading . broker . order . TradeOrder ( "123" , new com . sumzerotrading . data . StockTicker ( "ABC" ) , 10 , com . sumzerotrading .... | org . junit . Assert . assertFalse ( strategy . checkOpenOrders ( orders , new java . util . HashMap ( ) ) ) |
testClassifyWrongValues ( ) { org . geotools . process . vector . ClassifyByRangeProcess cp = new org . geotools . process . vector . ClassifyByRangeProcess ( ) ; boolean error = false ; try { cp . execute ( fc , "value" , new java . lang . String [ ] { "2" , "5" , "10" } , new java . lang . String [ ] { "A" , "B" , "C... | org . junit . Assert . assertTrue ( error ) |
testNotComplexTagBased ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( ( ( ( ( "<cffunction<sp>name=\"functionOne\">\r\n" + "<cfif<sp>a<sp>is<sp>1>\r\n" ) + "<cfset<sp>b<sp>=<sp>1>\r\n" ) + "<cfelse>\r\n" ) + "<cfset<sp>b<sp>=<sp>2>\r\n" ) + "</cfif>\r\n" ) + "<cfset<sp>b<sp>=<sp>2>\r\n" 0 ) + "</... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
should_return_this ( ) { org . fest . assertions . api . BigDecimalAssert returned = assertions . isLessThan ( expected ) ; "<AssertPlaceHolder>" ; } isLessThan ( byte ) { bytes . assertLessThan ( description , actual , expected ) ; return this ; } | org . junit . Assert . assertSame ( assertions , returned ) |
ping ( ) { "<AssertPlaceHolder>" ; } ping ( ) { org . junit . Assert . assertEquals ( "PONG" , redis . ping ( ) ) ; } | org . junit . Assert . assertEquals ( "PONG" , redis . ping ( ) ) |
testRotatesWithEmpty ( ) { eu . printingin3d . javascad . models . Abstract3dModel ts = testSubject . rotates ( java . util . Collections . < eu . printingin3d . javascad . coords . Angles3d > emptyList ( ) ) ; "<AssertPlaceHolder>" ; } rotates ( eu . printingin3d . javascad . coords . Angles3d [ ] ) { return rotates (... | org . junit . Assert . assertSame ( testSubject , ts ) |
bytes ( ) { byte [ ] value = new byte [ ] { 1 } ; model . setMyBytes ( value ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . datastore . Entity entity2 = ds . g... | org . junit . Assert . assertThat ( model2 . getMyBytes ( ) , org . hamcrest . CoreMatchers . is ( value ) ) |
noSuchStoreAllQuery ( ) { com . github . ftrossbach . kiqr . client . service . GenericBlockingKiqrClient client = new com . github . ftrossbach . kiqr . client . service . rest . GenericBlockingRestKiqrClientImpl ( "localhost" , port ) ; com . github . ftrossbach . kiqr . client . service . rest . Map < java . lang . ... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testStructuredEventWithoutStopTimeProperty ( ) { org . jacorb . notification . interfaces . Message _event = messageFactory_ . newMessage ( testStructured_ ) ; "<AssertPlaceHolder>" ; } hasStopTime ( ) { return false ; } | org . junit . Assert . assertTrue ( ( ! ( _event . hasStopTime ( ) ) ) ) |
testSerialization1 ( ) { org . jfree . chart . PaintMap m1 = new org . jfree . chart . PaintMap ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( m1 ) ; out . close ( ) ; java . ... | org . junit . Assert . assertEquals ( m1 , m2 ) |
testRangeMarkerIndices ( ) { org . jfree . data . category . CategoryDataset dataset = new org . jfree . data . category . DefaultCategoryDataset ( ) ; org . jfree . chart . axis . CategoryAxis xAxis = new org . jfree . chart . axis . CategoryAxis ( "X" ) ; org . jfree . chart . axis . NumberAxis yAxis = new org . jfre... | org . junit . Assert . assertTrue ( plot . getRangeMarkers ( 99 , Layer . FOREGROUND ) . contains ( yMarker1 ) ) |
testInvalidColorCodes ( ) { java . lang . StringBuilder allInvalidColorCodes = new java . lang . StringBuilder ( ) ; for ( char alphChar : "0123456789abcdefghijklmnopqrstuvwxyz" . toCharArray ( ) ) { if ( ( ChatColor . ALL_CODES . indexOf ( alphChar ) ) == ( - 1 ) ) { allInvalidColorCodes . append ( ChatColor . COLOR_C... | org . junit . Assert . assertEquals ( emptyLegacyText , invalidColorCodesLegacyText ) |
testDockerLoginNoAuthConfigFoundWhenCredentialHelperDoesNotMatchDomainOrAuth ( ) { executeWithTempHomeDir ( new io . fabric8 . maven . docker . util . AuthConfigFactoryTest . HomeDirExecutor ( ) { @ io . fabric8 . maven . docker . util . Override public void exec ( java . io . File homeDir ) throws java . io . IOExcept... | org . junit . Assert . assertNull ( config ) |
testModifyTicketAddUserEmptyUser ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyAddAccess ( ticketId , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_USER , "" ) ; "<AssertPlaceHolder>" ; } instanceForModifyAddAccess (... | org . junit . Assert . assertNotNull ( pi ) |
testWSTimeValueUpdate ( ) { boolean result = ihcResourceInteractionService . resourceUpdate ( new org . openhab . binding . ihc . internal . ws . resourcevalues . WSTimeValue ( 800008 , 15 , 34 , 45 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( result ) |
testAddRule ( ) { System . out . println ( ( ( getTestTraceHead ( "[CygnusGroupingRules.addRule]" ) ) + "--------<sp>Adding<sp>a<sp>new<sp>rule<sp>works" ) ) ; java . util . ArrayList < java . lang . String > ruleFields1 = new java . util . ArrayList < java . lang . String > ( ) ; ruleFields1 . add ( "servicePath" ) ; ... | org . junit . Assert . assertTrue ( ( ( cygnusGroupingRules . getRules ( ) . size ( ) ) == 2 ) ) |
testCreate ( ) { org . oscarehr . common . model . QuickList ql = new org . oscarehr . common . model . QuickList ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ql ) ; dao . persist ( ql ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( ql . getId ( ) ) |
testDefaultFormatVector3D ( ) { java . util . Locale defaultLocal = java . util . Locale . getDefault ( ) ; java . util . Locale . setDefault ( getLocale ( ) ) ; org . apache . commons . math3 . geometry . euclidean . threed . Vector3D c = new org . apache . commons . math3 . geometry . euclidean . threed . Vector3D ( ... | org . junit . Assert . assertEquals ( expected , actual ) |
getSourceMessageWithLastTimeNUTest ( ) { final long sourceUpdateTime = ( java . lang . System . currentTimeMillis ( ) ) / 1000 ; final net . violet . platform . datamodel . Source source = new net . violet . platform . datamodel . mock . SourceMock ( 3 , "$83020.pop" , 3 , sourceUpdateTime ) ; final long theLastTime = ... | org . junit . Assert . assertNull ( theMessage ) |
deveObterIcmsSN900ComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpo... | org . junit . Assert . assertEquals ( icmsSetado , icms . getIcmssn900 ( ) ) |
testConnection ( ) { java . lang . String urlString = java . lang . System . getProperty ( "service.url" ) ; System . out . println ( ( "testing<sp>url:" + urlString ) ) ; java . net . URL serviceUrl = new java . net . URL ( ( urlString + "hello-world" ) ) ; java . net . HttpURLConnection connection = ( ( java . net . ... | org . junit . Assert . assertEquals ( 200 , responseCode ) |
testRepeatedRestOpPrimitiveArray ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<rest(names)>,<sp><rest(names)>" ) ; e . add ( "names" , new int [ ] { 0 , 1 } ) ; java . lang . String expecting = "1,<sp>1" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . ge... | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
testEmptyOperatorTable ( ) { org . jparsec . Parser < java . lang . String > operand = org . jparsec . Parsers . constant ( "foo" ) ; "<AssertPlaceHolder>" ; } build ( org . jparsec . Parser ) { return org . jparsec . OperatorTable . buildExpressionParser ( operand , operators ( ) ) ; } | org . junit . Assert . assertSame ( operand , new org . jparsec . OperatorTable < java . lang . String > ( ) . build ( operand ) ) |
isOverwrittenBySubTypeOrResourceFunctionWhenNotOverwrittenShouldReturnFalse ( ) { ch . puzzle . itc . mobiliar . business . function . entity . AmwFunctionEntity function1 = new ch . puzzle . itc . mobiliar . business . function . entity . AmwFunctionEntityBuilder ( "name" , 2 ) . forResourceType ( resourceType ) . bui... | org . junit . Assert . assertFalse ( isOverwritten ) |
testRemoveRecordWithSuccessAndReverseRecordNotRemovedWhenReverseRecordExistsWithDifferentValueAndOverrideIsFalse ( ) { java . lang . String recordName = "recordname" ; java . lang . String recordIp = "40.30.20.10" ; java . lang . String domainName = "domain.name.com" ; java . lang . String reverseDomainName = "20.30.40... | org . junit . Assert . assertEquals ( true , answer . getResult ( ) ) |
testService ( ) { java . util . List < java . lang . String > actorIds = new java . util . ArrayList < java . lang . String > ( ) ; java . util . List < org . nuxeo . ecm . platform . task . Task > tasks = taskService . createTask ( session , administrator , targetDoc , "MyRoutingTask" , actorIds , false , null , null ... | org . junit . Assert . assertNotNull ( routingTask ) |
trueNumberEqualsFilterTest ( ) { final boolean parser = parser ( "notification/data-changed-notification/data-change-event/data/toasterStatus=1" , "data_change_notification_toaster_status_NUMBER.xml" ) ; "<AssertPlaceHolder>" ; } parser ( java . lang . String , java . lang . String ) { java . io . File xml = null ; for... | org . junit . Assert . assertTrue ( parser ) |
validate_notBound_noErrors ( ) { com . vaadin . data . BinderValidationStatus < com . vaadin . tests . data . bean . Person > status = binder . validate ( ) ; "<AssertPlaceHolder>" ; } isOk ( ) { return ! ( hasErrors ( ) ) ; } | org . junit . Assert . assertTrue ( status . isOk ( ) ) |
determineSegmentCount_noSegmentationBelow1000Entries ( ) { int _segs = org . cache2k . core . InternalCache2kBuilder . determineSegmentCount ( false , 12 , true , 999 , 0 ) ; "<AssertPlaceHolder>" ; } determineSegmentCount ( boolean , int , boolean , long , int ) { int _segmentCount = 1 ; if ( _availableProcessors > 1 ... | org . junit . Assert . assertEquals ( 1 , _segs ) |
addValue ( ) { "<AssertPlaceHolder>" ; } set ( int , short ) { boolean success = false ; int divIndex = index > > 1 ; boolean isZero = ( index & 1 ) == 0 ; short one ; short zero ; short old = 0 ; while ( ! success ) { int packed = live . get ( divIndex ) ; if ( isZero ) { old = unpackZero ( packed ) ; one = unpackOne ... | org . junit . Assert . assertNull ( subject . set ( key , value ) ) |
testRegister_requiredPropertyNotPresent ( ) { com . hortonworks . streamline . streams . cluster . catalog . Cluster cluster = getTestCluster ( 1L ) ; com . hortonworks . streamline . streams . cluster . register . impl . HBaseServiceRegistrar registrar = initializeServiceRegistrar ( ) ; try ( java . io . InputStream i... | org . junit . Assert . assertNull ( hbaseService ) |
testRecordNameIsNullSchemaIdentifierMissing ( ) { java . io . OutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . apache . nifi . serialization . record . RecordSet recordSet = org . apache . nifi . xml . TestWriteXMLResultUtils . getSimpleRecordsWithoutIdentifierInSchema ( ) ; final java . lang . Stri... | org . junit . Assert . assertEquals ( expectedMessage , actualMessage . toString ( ) ) |
allowLateRegistration_setToGarbage ( ) { eventBusService . init ( com . google . common . collect . ImmutableMap . of ( EventBusServiceDefault . KEY_ALLOW_LATE_REGISTRATION , "SDF$%FDVDFG" ) ) ; "<AssertPlaceHolder>" ; } isAllowLateRegistration ( ) { return allowLateRegistration ; } | org . junit . Assert . assertThat ( eventBusService . isAllowLateRegistration ( ) , org . hamcrest . Matchers . is ( false ) ) |
testResolveExceptionCode_other_exception_not_match ( ) { java . util . LinkedHashMap < java . lang . String , java . lang . String > exceptionMappings = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; exceptionMappings . put ( "Error" , "throwable001" ) ; testTarget . setExceptionM... | org . junit . Assert . assertThat ( actualExceptionCode , org . hamcrest . CoreMatchers . is ( "defaultExceptionCode001" ) ) |
processLocatorIncrementsCount ( ) { int count = lfr . processLocator ( 1 , executionContext , rollupBatchWriter , locators . get ( 0 ) ) ; "<AssertPlaceHolder>" ; verify ( executionContext , never ( ) ) . markUnsuccessful ( org . mockito . Matchers . < java . lang . Throwable > any ( ) ) ; verify ( executionContext , n... | org . junit . Assert . assertEquals ( 2 , count ) |
testIsAutomationPatternAvailablePatternID ( ) { mmarquee . automation . controls . AutomationWindow window = new mmarquee . automation . controls . AutomationWindow ( new mmarquee . automation . controls . ElementBuilder ( element ) ) ; when ( element . getPropertyValue ( PropertyID . IsGridItemPatternAvailable . getVa... | org . junit . Assert . assertTrue ( value ) |
addReferencedPackage_doNotAddMyOwn ( ) { umpleClass . setPackageName ( "abc" ) ; umpleClass . addReferencedPackage ( "abc" ) ; java . lang . String [ ] references = umpleClass . getNamespaces ( ) ; "<AssertPlaceHolder>" ; } setPackageName ( java . lang . String ) { this . packageName = packageName ; } | org . junit . Assert . assertEquals ( 0 , references . length ) |
testGetAuthObjWithFile ( ) { final com . microsoft . azure . maven . auth . AzureAuthHelper helper = new com . microsoft . azure . maven . auth . AzureAuthHelper ( mojo ) ; final com . microsoft . azure . maven . auth . AzureAuthHelper helperSpy = spy ( helper ) ; when ( mojo . getAuthenticationSetting ( ) ) . thenRetu... | org . junit . Assert . assertSame ( authenticated , helperSpy . getAuthObj ( ) ) |
toString_A$ ( ) { com . m3 . scalaflavor4j . Seq < java . lang . String > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( "foo" , "bar" , "baz" ) ; java . lang . String actual = seq . toString ( ) ; java . lang . String expected = "Seq(foo,bar,baz)" ; "<AssertPlaceHolder>" ; } toString ( ) { return "<function5>" ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
findPluginDeploymentDir ( ) { org . uberfire . backend . server . plugins . engine . PluginManager managerSpy = spy ( manager ) ; final java . lang . String pluginDeploymentDir = managerSpy . findPluginDeploymentDir ( contextRootDir ) ; verify ( managerSpy ) . encodePath ( contextRootDir ) ; "<AssertPlaceHolder>" ; } e... | org . junit . Assert . assertEquals ( this . pluginDeploymentDir , pluginDeploymentDir ) |
validIntegerDefaultShouldNotCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createDefinitions ( ToscaTypes . INTEGER , "4" ) ) ; "<AssertPlaceHolder>" ; } createDefinitions ... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
testSelection5 ( ) { final de . ovgu . featureide . fm . core . configuration . Configuration c = new de . ovgu . featureide . fm . core . configuration . Configuration ( fm , true ) ; boolean exception = false ; try { c . setManual ( "B" , Selection . SELECTED ) ; } catch ( final de . ovgu . featureide . fm . core . c... | org . junit . Assert . assertTrue ( exception ) |
testRandomNumberFieldNonMatch ( ) { java . lang . String fieldName = "sampleField" ; java . lang . Integer randomNumber = 4 ; org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setField ( fieldName ) ; rule . setType ( StreamRuleType . PRESENCE ) ; rule . setInverted ( false ) ; org . gray... | org . junit . Assert . assertTrue ( result ) |
testPatternDoNotMatchInput ( ) { java . lang . String pattern = "test<sp>command<sp><param1><sp>and<sp><param2><sp>with<sp><param3>" ; java . lang . String input = "test<sp>command<sp>input1<sp>and<sp>\'input<sp>2\'<sp>and<sp>with<sp>\"input<sp>3\"<sp>" ; java . util . Map < java . lang . String , java . lang . String ... | org . junit . Assert . assertEquals ( 0 , actual . size ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Activities_Get_Activity_Nodes_of_an_Activity" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testAcceptInValidParameter ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "get<sp>" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState ) { org... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) ) |
testGetPropertyName ( ) { org . geolatte . common . expressions . BooleanProperty prop = new org . geolatte . common . expressions . BooleanProperty ( "aBoolean" ) ; "<AssertPlaceHolder>" ; } getPropertyName ( ) { return propertyName ; } | org . junit . Assert . assertEquals ( "aBoolean" , prop . getPropertyName ( ) ) |
testIsNotSatisfiedPrincipalMissing ( ) { org . osgi . framework . Bundle bundle = mock ( org . osgi . framework . Bundle . class ) ; java . util . HashSet emptySet = new java . util . HashSet ( ) ; java . util . HashSet < java . security . Principal > principalSet = new java . util . HashSet ( ) ; principalSet . add ( ... | org . junit . Assert . assertThat ( satisfied , org . hamcrest . core . Is . is ( false ) ) |
getCountOfPatients_shouldCountPatientsByName_SignatureNo1 ( ) { long patientCount = dao . getCountOfPatients ( "Bilbo" ) ; "<AssertPlaceHolder>" ; } getCountOfPatients ( java . lang . String ) { return getCountOfPatients ( query , false ) ; } | org . junit . Assert . assertEquals ( 1 , patientCount ) |
testNakedValue ( ) { final org . apache . manifoldcf . core . interfaces . Configuration object2 = new org . apache . manifoldcf . core . interfaces . Configuration ( ) ; object2 . fromJSON ( org . apache . manifoldcf . core . interfaces . ConfigurationTest . testData ) ; final java . lang . String jsonResult = object2... | org . junit . Assert . assertEquals ( jsonResult . length ( ) , org . apache . manifoldcf . core . interfaces . ConfigurationTest . testData . length ( ) ) |
testDefaultFormatVector1D ( ) { java . util . Locale defaultLocal = java . util . Locale . getDefault ( ) ; java . util . Locale . setDefault ( getLocale ( ) ) ; org . apache . commons . math3 . geometry . euclidean . oned . Vector1D c = new org . apache . commons . math3 . geometry . euclidean . oned . Vector1D ( 232.... | org . junit . Assert . assertEquals ( expected , actual ) |
should_create_simple_query ( ) { final java . lang . String name = "findByName" ; final java . lang . String expected = "select<sp>e<sp>from<sp>Simple<sp>e<sp>" + "where<sp>e.name<sp>=<sp>?1" ; java . lang . String result = org . apache . deltaspike . data . impl . builder . part . QueryRoot . create ( name , repo , pr... | org . junit . Assert . assertEquals ( expected , result ) |
getPageHtml ( ) { when ( pageRenderer . getHtml ( de . blizzy . documentr . web . FunctionsTest . PROJECT , de . blizzy . documentr . web . FunctionsTest . BRANCH , de . blizzy . documentr . web . FunctionsTest . PAGE , authentication , Locale . US , de . blizzy . documentr . web . FunctionsTest . CONTEXT ) ) . thenRet... | org . junit . Assert . assertEquals ( "htmlWithMacros" , de . blizzy . documentr . web . Functions . getPageHtml ( de . blizzy . documentr . web . FunctionsTest . PROJECT , de . blizzy . documentr . web . FunctionsTest . BRANCH , de . blizzy . documentr . web . FunctionsTest . PAGE ) ) |
accept ( ) { java . lang . Boolean result = this . fe . execute ( new com . airhacks . enhydrator . in . Row ( ) , "true" ) ; "<AssertPlaceHolder>" ; } execute ( com . airhacks . enhydrator . in . Row , java . lang . String ) { javax . script . Bindings bindings = com . airhacks . enhydrator . transform . ScriptingEnvi... | org . junit . Assert . assertTrue ( result ) |
testOpenUrlWithValidPathOpenReview ( ) { java . lang . String url = "http://review.mylyn.org/#/c/4698/1/foo/bar.java" ; org . eclipse . mylyn . internal . gerrit . ui . GerritUrlHandler spy = setUpOpenUrlTests ( url ) ; org . eclipse . mylyn . internal . gerrit . ui . editor . GerritTaskEditorPage page = mock ( org . e... | org . junit . Assert . assertEquals ( path , spy . getFileItem ( review , patchSetNumber , path ) . getName ( ) ) |
taskExceptionThrown ( ) { edt . schedule ( new java . lang . Runnable ( ) { @ jetbrains . jetpad . base . edt . Override public void run ( ) { throw new java . lang . UnsupportedOperationException ( ) ; } } ) ; java . lang . Runnable r = org . mockito . Mockito . mock ( jetbrains . jetpad . base . edt . Runnable . clas... | org . junit . Assert . assertEquals ( 1 , edt . size ( ) ) |
testRemove ( ) { com . itextpdf . kernel . pdf . PdfDocument doc = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( new com . itextpdf . io . source . ByteArrayOutputStream ( ) ) ) ; com . itextpdf . kernel . pdf . PdfArray array = new com . itextpdf . kernel . pdf . Pdf... | org . junit . Assert . assertEquals ( 0 , array . size ( ) ) |
testFileStatusPipeFile ( ) { org . apache . hadoop . fs . RawLocalFileSystem origFs = new org . apache . hadoop . fs . RawLocalFileSystem ( ) ; org . apache . hadoop . fs . RawLocalFileSystem fs = spy ( origFs ) ; org . apache . hadoop . conf . Configuration conf = mock ( org . apache . hadoop . conf . Configuration . ... | org . junit . Assert . assertTrue ( ( ( ( stats != null ) && ( ( stats . length ) == 1 ) ) && ( ( stats [ 0 ] ) == stat ) ) ) |
test_ulonglong_disc_union ( ) { org . jacorb . test . orb . ULongLongDiscUnion testValue = new org . jacorb . test . orb . ULongLongDiscUnion ( ) ; testValue . s ( "foo" ) ; org . omg . CORBA . Any outAny = setup . getClientOrb ( ) . create_any ( ) ; org . jacorb . test . orb . ULongLongDiscUnionHelper . insert ( outAn... | org . junit . Assert . assertTrue ( outAny . equal ( inAny ) ) |
testValidInverseOf ( ) { com . github . anno4j . Anno4j anno4j = new com . github . anno4j . Anno4j ( ) ; com . github . anno4j . ValidatedTransaction transaction = anno4j . createValidatedTransaction ( ) ; transaction . begin ( ) ; com . github . anno4j . transaction . ValidatedTransactionTest . SpecialTestResource re... | org . junit . Assert . assertFalse ( exceptionThrown ) |
getProjectTypeNull ( ) { when ( directoryStream . spliterator ( ) ) . thenReturn ( java . util . Collections . < org . uberfire . java . nio . file . Path > emptyList ( ) . spliterator ( ) ) ; final org . kie . workbench . common . stunner . bpmn . service . ProjectType projectType = tested . getProjectType ( projectPa... | org . junit . Assert . assertEquals ( projectType , null ) |
testfindGoverningEdOrgs ( ) { org . mockito . Mockito . when ( mockEntity . getType ( ) ) . thenReturn ( EntityNames . TEACHER_SCHOOL_ASSOCIATION ) ; org . mockito . Mockito . when ( mockEntity . getBody ( ) ) . thenReturn ( body ) ; java . util . Set < java . lang . String > edOrgs = new java . util . HashSet < java .... | org . junit . Assert . assertTrue ( resolver . findGoverningEdOrgs ( mockEntity ) . equals ( edOrgs ) ) |
testMinus ( ) { de . metanome . algorithm_helper . data_structures . ColumnCombinationBitset columnCombination1 = new de . metanome . algorithm_helper . data_structures . ColumnCombinationBitset ( 1 , 2 , 3 , 4 ) ; de . metanome . algorithm_helper . data_structures . ColumnCombinationBitset columnCombination2 = new de ... | org . junit . Assert . assertEquals ( expectedColumnCombination , actualColumnCombination ) |
getInstanceFromName ( ) { for ( int i = 1 ; i < 5 ; i ++ ) { final org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo pojo = ( ( org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo ) ( org . apache . openejb . server . groovy . BeanManagerHelperTest . helper . beanFromName ( "Be... | org . junit . Assert . assertEquals ( ( 5 + i ) , pojo . id ) |
testComponentWidths ( ) { "<AssertPlaceHolder>" ; context . getComponentWidths ( ) . forEach ( org . junit . Assert :: assertNull ) ; } getRequiredComponentWidthCount ( ) { return ( getColumn ( ) . size ( ) ) + ( org . kie . workbench . common . dmn . api . definition . v1_1 . Relation . STATIC_COLUMNS ) ; } | org . junit . Assert . assertEquals ( context . getRequiredComponentWidthCount ( ) , context . getComponentWidths ( ) . size ( ) ) |
shouldReturnErrorOnHostNameThatStartsWithDotValidation ( ) { java . lang . String invalidHostname = ".host.com" ; when ( constant . invalidHostName ( ) ) . thenReturn ( "ErrorMessage" ) ; java . lang . String errorMessage = ( ( org . eclipse . che . ide . ui . dialogs . input . InputValidator ) ( presenter . hostNameVa... | org . junit . Assert . assertEquals ( "ErrorMessage" , errorMessage ) |
testDelegateUserRemoved ( ) { java . lang . Class < ? extends ca . corefacility . bioinformatics . irida . model . event . ProjectEvent > clazz = ca . corefacility . bioinformatics . irida . model . event . UserRemovedProjectEvent . class ; ca . corefacility . bioinformatics . irida . model . project . Project project ... | org . junit . Assert . assertTrue ( ( event instanceof ca . corefacility . bioinformatics . irida . model . event . UserRemovedProjectEvent ) ) |
whenAddingPrematureTermination_itIsExecutedCorrectly ( ) { com . graphhopper . jsprit . core . algorithm . SearchStrategyManager stratManager = mock ( com . graphhopper . jsprit . core . algorithm . SearchStrategyManager . class ) ; com . graphhopper . jsprit . core . algorithm . VehicleRoutingAlgorithm algorithm = new... | org . junit . Assert . assertEquals ( 50 , counter . getCountIterations ( ) ) |
sanityTagIndexNotSame ( ) { com . github . mgunlogson . cuckoofilter4j . SerializableSaltedHasher < java . lang . Integer > hasher = new com . github . mgunlogson . cuckoofilter4j . SerializableSaltedHasher ( 0 , 0 , com . google . common . hash . Funnels . integerFunnel ( ) , com . github . mgunlogson . cuckoofilter4j... | org . junit . Assert . assertTrue ( ( ( ( bt . index ) != ( bt . tag ) ) || ( ( bt2 . index ) != ( bt2 . tag ) ) ) ) |
arrayListAdd ( ) { java . lang . String mSig = "<java.util.ArrayList:<sp>void<sp>add(int,java.lang.Object)>" ; java . util . Set < soot . jimple . infoflow . methodSummary . data . summary . MethodFlow > flow = createSummaries ( mSig ) . getAllFlows ( ) ; "<AssertPlaceHolder>" ; } getAllFlows ( ) { return ( this . flow... | org . junit . Assert . assertNotNull ( flow ) |
getBxDocumentTest ( ) { pl . edu . icm . cermine . InputStream testStream = pl . edu . icm . cermine . ContentExtractorTest . class . getResourceAsStream ( pl . edu . icm . cermine . ContentExtractorTest . TEST_PDF_1 ) ; pl . edu . icm . cermine . structure . model . BxDocument testDocument ; try { extractor . setPDF (... | org . junit . Assert . assertTrue ( pl . edu . icm . cermine . structure . tools . BxModelUtils . areEqual ( expDocument , testDocument ) ) |
testConverterWithKey ( ) { final org . apache . logging . log4j . message . Message msg = new org . apache . logging . log4j . message . SimpleMessage ( "Hello" ) ; final java . lang . String [ ] options = new java . lang . String [ ] { "object" } ; final org . apache . logging . log4j . core . pattern . MdcPatternConv... | org . junit . Assert . assertEquals ( expected , str ) |
testRequestThreadExecRunsRunnableOnCallingThread ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . Thread > invocationThread = new java . util . concurrent . atomic . AtomicReference ( ) ; java . lang . Runnable runnable = new java . lang . Runnable ( ) { @ org . eclipse . rap . rwt . inte... | org . junit . Assert . assertSame ( java . lang . Thread . currentThread ( ) , invocationThread . get ( ) ) |
repositorySavesParty ( ) { com . gigy . model . Party party = new com . gigy . model . Party ( ) ; party . setLocation ( "Garden" ) ; com . gigy . model . Party result = repository . save ( party ) ; "<AssertPlaceHolder>" ; } getLocation ( ) { return location ; } | org . junit . Assert . assertEquals ( result . getLocation ( ) , "Garden" ) |
testComments ( ) { java . lang . StringBuffer buf = new java . lang . StringBuffer ( ) ; buf . append ( ( "#<sp>this<sp>is<sp>a<sp>comment" + ( org . apache . openjpa . lib . util . TestPropertiesParser . LS ) ) ) ; buf . append ( ( "<sp>#<sp>another<sp>one,<sp>with<sp>leading<sp>whitespace<sp>" + ( org . apache . open... | org . junit . Assert . assertEquals ( 0 , p . size ( ) ) |
testGetInstalledVersion ( ) { java . io . FileInputStream inputStream = new java . io . FileInputStream ( "installedVersion.xml" ) ; java . lang . String installedVersionXml = org . apache . commons . io . IOUtils . toString ( inputStream ) ; org . pentaho . marketplace . domain . model . entities . serialization . IMa... | org . junit . Assert . assertThat ( actualVersion , is ( equalTo ( expectedVersion ) ) ) |
testDeleteConfValue_1 ( ) { java . lang . String propertyName = "abcd" ; boolean result = xmlManipulator . deleteConfValue ( filePath , propertyName ) ; "<AssertPlaceHolder>" ; } deleteConfValue ( java . lang . String , java . lang . String ) { try { javax . xml . bind . JAXBContext jaxbContext = javax . xml . bind . J... | org . junit . Assert . assertEquals ( false , result ) |
testGetWrappedConfigurations ( ) { "<AssertPlaceHolder>" ; } getWrappedConfigurations ( ) { return wrappedConfigs ; } | org . junit . Assert . assertEquals ( 2 , instance . getWrappedConfigurations ( ) . size ( ) ) |
getTablesToRepairRemoveOneTableFromListOneWithTwcsTest ( ) { io . cassandrareaper . jmx . JmxProxy proxy = io . cassandrareaper . jmx . JmxProxyTest . mockJmxProxyImpl ( ) ; when ( context . jmxConnectionFactory . connectAny ( cluster ) ) . thenReturn ( proxy ) ; when ( context . jmxConnectionFactory . connectAny ( org... | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "table2" ) , service . getTablesToRepair ( proxy , cluster , unit ) ) |
whenRegisterBean_thenOk ( ) { context . registerBean ( com . baeldung . functional . MyService . class , ( ) -> new com . baeldung . functional . MyService ( ) ) ; com . baeldung . functional . MyService myService = ( ( com . baeldung . functional . MyService ) ( context . getBean ( "com.baeldung.functional.MyService" ... | org . junit . Assert . assertTrue ( ( ( myService . getRandomNumber ( ) ) < 10 ) ) |
validationOfUnknownPropertyOwnNamespaceSuccess ( ) { java . lang . String roomWithValidNamespaces = "<?xml<sp>version='1.0'<sp>encoding='UTF-8'?>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "Rooms" 3 http : org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . testutil . mo... | org . junit . Assert . assertNotNull ( result ) |
testLoginWith2AppsAndLogoutFrom1 ( ) { cc . blynk . server . core . model . Profile profile = cc . blynk . integration . TestUtil . parseProfile ( cc . blynk . integration . TestUtil . readTestUserProfile ( ) ) ; cc . blynk . server . core . model . widgets . notifications . Notification notification = profile . getDas... | org . junit . Assert . assertEquals ( expectedJson , message . toJson ( ) ) |
testFunctionalEven ( ) { ops . run ( net . imagej . ops . loop . DefaultLoopComputer . class , out , in , computerOp , new net . imagej . ops . bufferfactories . ImgImgSameTypeFactory < net . imglib2 . type . numeric . integer . ByteType > ( ) , numIterations ) ; final net . imglib2 . Cursor < net . imglib2 . type . nu... | org . junit . Assert . assertEquals ( numIterations , c . next ( ) . get ( ) ) |
elementHasOneAttribute ( ) { goToUrlAndDontReloadIfAlreadyOpen ( "http://acama-systems.de/" ) ; com . abmash . api . HtmlElement element = com . abmash . test . TestAbmashCore . browser . query ( select ( "html<sp>><sp>body<sp>><sp>div#page_margins" ) ) . findFirst ( ) ; java . util . HashSet < java . lang . String > e... | org . junit . Assert . assertEquals ( expctdAttributeNames , actualAttributeNames ) |
delete_nonExisting ( ) { final org . apache . rya . indexing . geotemporal . storage . EventStorage storage = new org . apache . rya . indexing . geotemporal . mongo . MongoEventStorage ( super . getMongoClient ( ) , org . apache . rya . indexing . geotemporal . mongo . MongoEventStorageIT . RYA_INSTANCE_NAME ) ; final... | org . junit . Assert . assertFalse ( deleted ) |
whenChangedFinalReference_thenChanged ( ) { final com . baeldung . finalkeyword . Cat cat = new com . baeldung . finalkeyword . Cat ( ) ; cat . setWeight ( 5 ) ; "<AssertPlaceHolder>" ; } getWeight ( ) { return weight ; } | org . junit . Assert . assertEquals ( 5 , cat . getWeight ( ) ) |
defaultName ( ) { org . easymock . tests . IMethods mock = createMock ( org . easymock . tests . IMethods . class ) ; java . lang . String expected = "EasyMock<sp>for<sp>" + ( org . easymock . tests . IMethods . class . toString ( ) ) ; java . lang . String actual = mock . toString ( ) ; "<AssertPlaceHolder>" ; } toStr... | org . junit . Assert . assertEquals ( expected , actual ) |
testAppendEntry ( ) { org . apache . ratis . server . storage . LogSegment closedSegment = prepareLogSegment ( 0 , 99 , false ) ; cache . addSegment ( closedSegment ) ; final org . apache . ratis . RaftTestUtil . SimpleOperation m = new org . apache . ratis . RaftTestUtil . SimpleOperation ( "m" ) ; try { org . apache ... | org . junit . Assert . assertNotNull ( cache . getOpenSegment ( ) ) |
testAuthForBuild_Success ( ) { final com . spotify . docker . client . messages . RegistryConfigs configs = com . spotify . docker . client . messages . RegistryConfigs . create ( com . google . common . collect . ImmutableMap . of ( "server1" , com . spotify . docker . client . messages . RegistryAuth . builder ( ) . ... | org . junit . Assert . assertThat ( supplier . authForBuild ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( configs ) ) ) |
noOverride ( ) { org . easymock . java8 . IMethods o = new org . easymock . java8 . Methods . NoDefaultOverride ( ) ; java . lang . reflect . Method method = org . easymock . internal . ReflectionUtils . findMethod ( o . getClass ( ) , org . easymock . java8 . ReflectionUtilsTest . DEFAULT_INTERFACE_METHOD , org . easy... | org . junit . Assert . assertEquals ( 1 , method . invoke ( o ) ) |
testOpenConnection_1 ( ) { when ( connection . authenticateWithPassword ( username , password ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; verify ( connection ) . connect ( ) ; verify ( connection ) . authenticateWithPassword ( username , password ) ; } OpenConnection ( java . lang . String , int , java . lang .... | org . junit . Assert . assertNotNull ( org . pentaho . di . trans . steps . ssh . SSHData . OpenConnection ( server , port , username , password , false , null , null , 0 , null , null , 0 , null , null ) ) |
testGenericMap_rt ( ) { org . apache . servicecomb . it . schema . Generic < java . util . Map < java . lang . String , java . lang . String > > mapGeneric = new org . apache . servicecomb . it . schema . Generic ( ) ; java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( )... | org . junit . Assert . assertEquals ( test , "hello" ) |
testGetUsers ( ) { org . pentaho . platform . web . http . api . resources . UserListWrapper mockWrapper = mock ( org . pentaho . platform . web . http . api . resources . UserListWrapper . class ) ; doReturn ( mockWrapper ) . when ( userRoleListResource . userRoleListService ) . getUsers ( ) ; org . pentaho . platform... | org . junit . Assert . assertEquals ( mockWrapper , testWrapper ) |
givenFolderNotFoundWhenCreateFolderThenOK ( ) { storage . createContainer ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME ) ; storage . createFolder ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME , fr . gouv . vitam . workspace . common . Workspac... | org . junit . Assert . assertTrue ( storage . isExistingFolder ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME , fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . FOLDER_NAME ) ) |
shouldReturnTrueOnMatchingConditionGivenCurrentDateIsGreaterThanCutoffDate ( ) { org . flips . model . FeatureContext featureContext = mock ( org . flips . model . FeatureContext . class ) ; org . flips . model . FlipAnnotationAttributes flipAnnotationAttributes = mock ( org . flips . model . FlipAnnotationAttributes .... | org . junit . Assert . assertEquals ( true , result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.