input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testQualifiedPair ( ) { org . apache . cxf . aegis . databinding . AegisDatabinding aegisBinding = new org . apache . cxf . aegis . databinding . AegisDatabinding ( ) ; org . apache . cxf . jaxws . JaxWsProxyFactoryBean proxyFactory = new org . apache . cxf . jaxws . JaxWsProxyFactoryBean ( ) ; proxyFactory . setDataBi... | org . junit . Assert . assertEquals ( 111 , ret ) |
testRulesSortingModeInsert ( ) { net . bobosse . gwt . rulesengine . client . impl . engines . SingleFactRulesEngine engine = new net . bobosse . gwt . rulesengine . client . impl . engines . SingleFactRulesEngine ( ) ; net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule first = new net . bobosse . gw... | org . junit . Assert . assertEquals ( mixed , sortedRules ) |
shouldBeFalseWhenGivenTrueAndFalse ( ) { final org . pitest . functional . predicate . And < java . lang . Object > testee = and ( ( i ) -> true , ( i ) -> false ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String ) { return this . includedClassPathElement . contains ( a ) ; } | org . junit . Assert . assertFalse ( testee . test ( null ) ) |
testBroadcastMult ( ) { org . nd4j . linalg . api . ndarray . INDArray num = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , - 1.0 , - 2.0 , - 3.0 , - 4.0 , - 5.0 , - 6.0 , - 7.0 , - 8.0 } ) . reshape ( 2 , 8 ) ; org . nd4j . linalg . api . ndarray . INDA... | org . junit . Assert . assertEquals ( expected , actual ) |
testFindUncoveredHttpMethods01 ( ) { org . apache . tomcat . util . descriptor . web . SecurityConstraint [ ] result = org . apache . tomcat . util . descriptor . web . SecurityConstraint . findUncoveredHttpMethods ( new org . apache . tomcat . util . descriptor . web . SecurityConstraint [ ] { org . apache . tomcat . ... | org . junit . Assert . assertEquals ( 0 , result . length ) |
testCreateAnnotationOnInitialization ( ) { org . eclipse . emf . ecore . EAnnotation annotation = EcoreFactory . eINSTANCE . createEAnnotation ( ) ; annotation . setSource ( "XTest" ) ; annotation . getDetails ( ) . put ( "Test" , "true" ) ; "<AssertPlaceHolder>" ; } getDetails ( ) { if ( ( details ) == null ) { detail... | org . junit . Assert . assertEquals ( "true" , annotation . getDetails ( ) . get ( "Test" ) ) |
libraryScion ( ) { org . json . JSONObject obj = getJSONObject ( "scion.json" ) ; "<AssertPlaceHolder>" ; } hasLibrary ( org . json . JSONObject ) { java . lang . Object o = description . opt ( net . sf . eclipsefp . haskell . core . cabalmodel . JSONDescriptionHelper . COND_LIBRARY ) ; return o instanceof org . json .... | org . junit . Assert . assertTrue ( net . sf . eclipsefp . haskell . core . cabalmodel . JSONDescriptionHelper . hasLibrary ( obj ) ) |
testReplaceAllFinishes_165497_f ( ) { final java . util . Map < java . lang . String , java . lang . Object > props = new java . util . HashMap ( ) ; props . put ( EditorFindSupport . FIND_WHAT , "a" ) ; props . put ( EditorFindSupport . FIND_REPLACE_WITH , "A" ) ; props . put ( EditorFindSupport . FIND_HIGHLIGHT_SEARC... | org . junit . Assert . assertTrue ( finished [ 0 ] ) |
testGetChildren_returnsSafeCopy ( ) { org . eclipse . swt . widgets . Button button = new org . eclipse . swt . widgets . Button ( composite , org . eclipse . swt . SWT . PUSH ) ; org . eclipse . swt . widgets . Control [ ] children = composite . getChildren ( ) ; children [ 0 ] = null ; "<AssertPlaceHolder>" ; } getCh... | org . junit . Assert . assertArrayEquals ( new org . eclipse . swt . widgets . Control [ ] { button } , composite . getChildren ( ) ) |
createQuery2 ( ) { java . util . List < com . querydsl . core . Tuple > rows = query ( ) . from ( com . querydsl . jpa . HibernateBase . cat ) . select ( new com . querydsl . core . types . Expression [ ] { com . querydsl . jpa . HibernateBase . cat . id , com . querydsl . jpa . HibernateBase . cat . name } ) . createQ... | org . junit . Assert . assertEquals ( 2 , row . size ( ) ) |
getDiskImages ( ) { prepareVdcClientWithDiskImages ( ) ; java . util . List < org . oscm . app . iaas . data . DiskImage > result = rorVSystemCommunication . getDiskImages ( properties ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , result . size ( ) ) |
testGetBusinessObjectDefinitionTagsByBusinessObjectDefinition ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionKey businessObjectDefinitionKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) ; java . util . List < org . finra . herd . model... | org . junit . Assert . assertEquals ( BusinessObjectDefinitionTagKeys , result ) |
reduceLeft ( ) { com . jnape . palatable . lambda . monoid . Monoid < java . lang . Integer > sum = com . jnape . palatable . lambda . monoid . Monoid . monoid ( ( x , y ) -> x + y , 0 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 6 ) ) , sum . reduceLeft ( asList ( 1 , 2 , 3 ) ) ) |
testToString ( ) { com . thoughtworks . qdox . model . expression . AnnotationValue value = mock ( com . thoughtworks . qdox . model . expression . AnnotationValue . class ) ; when ( value . getParameterValue ( ) ) . thenReturn ( "index" ) ; com . thoughtworks . qdox . model . expression . PostIncrement expr = new com ... | org . junit . Assert . assertEquals ( ( ( value . toString ( ) ) + "++" ) , expr . toString ( ) ) |
testOptimize ( ) { org . hibernate . search . FullTextSession s = org . hibernate . search . Search . getFullTextSession ( openSession ( ) ) ; org . hibernate . Transaction tx = s . beginTransaction ( ) ; int loop = 2000 ; for ( int i = 0 ; i < loop ; i ++ ) { org . hibernate . search . test . session . Email email = n... | org . junit . Assert . assertEquals ( 2000 , result ) |
convertJsonToDataNode ( ) { org . onosproject . restconf . utils . ObjectMapper mapper = new org . onosproject . restconf . utils . ObjectMapper ( ) ; org . onosproject . restconf . utils . ObjectNode compareNode = mapper . createObjectNode ( ) . put ( "alpha" , "abc" ) . put ( "beta" , 123 ) . put ( "gamma" , true ) ;... | org . junit . Assert . assertEquals ( testNode , compareNode ) |
testGetRF1DifferentOrders ( ) { org . nd4j . linalg . api . ndarray . INDArray a = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 ) . reshape ( 3 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7.0 , 8.0 , 9.0 , 0.14285715 , 0.85... | org . junit . Assert . assertEquals ( exp , a ) |
getZeroTimeout ( ) { io . trane . future . Future < java . lang . Integer > future = io . trane . future . Future . value ( 1 ) ; "<AssertPlaceHolder>" ; } get ( io . trane . future . Future ) { return future . get ( Duration . ZERO ) ; } | org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , future . get ( Duration . ZERO ) ) |
testHeapCacualtion_2 ( ) { tool = new org . teiid . sizing . Caculation ( 2 , 200 , true ) ; "<AssertPlaceHolder>" ; } heapCaculation ( ) { int sources = this . getSource_count ( ) ; int concurrent = this . getQueries_concurrent ( ) ; int total_in_mb = ( ( concurrent * 5 ) * sources ) + 300 ; int heap = ( total_in_mb /... | org . junit . Assert . assertEquals ( 3 , tool . heapCaculation ( ) ) |
getPossibleUserIdsOfPendingTasks_should_return_users_mapped_through_his_groupid_in_actormember ( ) { final org . bonitasoft . engine . actor . mapping . model . SActor actor = repository . add ( anActor ( ) . build ( ) ) ; final org . bonitasoft . engine . core . process . instance . model . SPendingActivityMapping add... | org . junit . Assert . assertThat ( userIds ) |
testSmsMessageError ( ) { org . restcomm . connect . dao . entities . SmsMessage smsMessage = createSms ( ) ; final org . restcomm . connect . dao . SmsMessagesDao messages = org . restcomm . connect . dao . mybatis . SmsMessagesDaoTest . manager . getSmsMessagesDao ( ) ; messages . addSmsMessage ( smsMessage ) ; final... | org . junit . Assert . assertEquals ( MessageError . QUEUE_OVERFLOW , resultantSmsMessage . getError ( ) ) |
testDecode ( ) { java . lang . String original = "ein<sp>verr+++ckter<sp>text<sp>mit<sp>Leerzeichen,<sp>Plus<sp>und<sp>Umlauten" ; java . lang . String encoded = java . net . URLEncoder . encode ( original , "UTF-8" ) ; "<AssertPlaceHolder>" ; } decodeURIComponent ( java . lang . String , boolean ) { if ( s == null ) {... | org . junit . Assert . assertEquals ( original , io . vertx . core . net . impl . URIDecoder . decodeURIComponent ( encoded , true ) ) |
testGetLambdaClientConfig ( ) { com . xti . jenkins . plugin . awslambda . upload . LambdaUploadVariables variables = new com . xti . jenkins . plugin . awslambda . upload . LambdaUploadVariables ( false , "ID" , hudson . util . Secret . fromString ( "SECRET}" ) , "30" 1 , "30" 3 , "description<sp>DESCRIPTION" , "FUNCT... | org . junit . Assert . assertNotNull ( lambda ) |
resetShouldClearBytes ( ) { container1 . bytesField . clear ( ) . append ( "value1" ) ; container2 . bytesField . clear ( ) . append ( "value2" ) ; net . openhft . chronicle . wire . Wires . reset ( container1 ) ; net . openhft . chronicle . wire . Wires . reset ( container2 ) ; container1 . bytesField . clear ( ) . ap... | org . junit . Assert . assertEquals ( "" , container2 . bytesField . toString ( ) ) |
testRemove ( ) { com . liferay . social . kernel . model . SocialActivityLimit newSocialActivityLimit = addSocialActivityLimit ( ) ; _persistence . remove ( newSocialActivityLimit ) ; com . liferay . social . kernel . model . SocialActivityLimit existingSocialActivityLimit = _persistence . fetchByPrimaryKey ( newSocial... | org . junit . Assert . assertNull ( existingSocialActivityLimit ) |
sumUsingReduce ( ) { int count = java . util . stream . Stream . of ( 1 , 2 , 3 ) . reduce ( 0 , ( acc , element ) -> acc + element ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 6 , count ) |
testChanges ( ) { final org . drools . verifier . core . index . keys . Values a = new org . drools . verifier . core . index . keys . Values ( ) ; final org . drools . verifier . core . index . keys . Values b = new org . drools . verifier . core . index . keys . Values ( ) ; "<AssertPlaceHolder>" ; } isThereChanges (... | org . junit . Assert . assertFalse ( a . isThereChanges ( b ) ) |
testHandle ( ) { response = new com . weibo . api . motan . rpc . DefaultResponse ( ) ; response . setValue ( "test" ) ; response . setProcessTime ( 1 ) ; com . weibo . api . motan . rpc . Provider provider = new com . weibo . api . motan . rpc . DefaultProvider ( null , null , com . weibo . api . motan . protocol . ya... | org . junit . Assert . assertEquals ( com . weibo . api . motan . protocol . yar . YarProtocolUtil . convert ( response , "JSON" ) , yarResponse ) |
queryCount ( ) { com . dexcoder . test . model . User u = new com . dexcoder . test . model . User ( ) ; u . setUserType ( "1" ) ; int count = jdbcDao . queryCount ( u ) ; "<AssertPlaceHolder>" ; } queryCount ( com . dexcoder . dal . build . Criteria ) { com . dexcoder . dal . BoundSql boundSql = criteria . mappingHand... | org . junit . Assert . assertTrue ( ( count > 0 ) ) |
testSerialization ( ) { com . orsoncharts . data . KeyedValuesItemKey k1 = new com . orsoncharts . data . KeyedValuesItemKey ( "A" ) ; com . orsoncharts . data . KeyedValuesItemKey k2 = ( ( com . orsoncharts . data . KeyedValuesItemKey ) ( com . orsoncharts . TestUtils . serialized ( k1 ) ) ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertTrue ( k1 . equals ( k2 ) ) |
purgeDrug_shouldPurgeTheGivenDrug ( ) { int drugId = 2 ; conceptService . purgeDrug ( conceptService . getDrug ( drugId ) ) ; "<AssertPlaceHolder>" ; } getDrug ( java . lang . Integer ) { return ( ( org . openmrs . Drug ) ( sessionFactory . getCurrentSession ( ) . get ( org . openmrs . Drug . class , drugId ) ) ) ; } | org . junit . Assert . assertNull ( conceptService . getDrug ( drugId ) ) |
createPlatformException ( ) { "<AssertPlaceHolder>" ; org . bonitasoft . engine . platform . PlatformIT . platformAPI . initializePlatform ( ) ; } isPlatformInitialized ( ) { org . junit . Assert . assertTrue ( org . bonitasoft . engine . platform . PlatformIT . platformAPI . isPlatformInitialized ( ) ) ; } | org . junit . Assert . assertTrue ( org . bonitasoft . engine . platform . PlatformIT . platformAPI . isPlatformInitialized ( ) ) |
testCanHandle ( ) { org . apache . cxf . ws . security . sts . provider . model . secext . BinarySecurityTokenType binarySecurityTokenType = new org . apache . cxf . ws . security . sts . provider . model . secext . BinarySecurityTokenType ( ) ; binarySecurityTokenType . setEncodingType ( ( ( org . apache . wss4j . dom... | org . junit . Assert . assertEquals ( true , result ) |
AcceptedTriggersRespectGuards ( ) { com . github . oxo42 . stateless4j . StateMachineConfig < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > config = new com . github . oxo42 . stateless4j . StateMachineConfig ( ) ; config . configure ( State . B ) . permitIf ( Trigger . X ,... | org . junit . Assert . assertEquals ( 0 , sm . getPermittedTriggers ( ) . size ( ) ) |
select_withWritePolicyAllow ( ) { org . sonatype . nexus . repository . storage . WritePolicy writePolicy = underTest . select ( asset , org . sonatype . nexus . repository . maven . internal . ALLOW ) ; "<AssertPlaceHolder>" ; } select ( org . sonatype . nexus . repository . storage . Asset , org . sonatype . nexus . ... | org . junit . Assert . assertEquals ( writePolicy , org . sonatype . nexus . repository . maven . internal . ALLOW ) |
testValidPasses ( ) { hu . elte . txtuml . api . model . execution . seqdiag . sequences . SequenceMessageSendingStrictValid diag = new hu . elte . txtuml . api . model . execution . seqdiag . sequences . SequenceMessageSendingStrictValid ( ) ; hu . elte . txtuml . api . model . execution . SequenceDiagramExecutor exec... | org . junit . Assert . assertTrue ( executor . getErrors ( ) . isEmpty ( ) ) |
testUsernameToken ( ) { java . lang . String actions = ( ( ( ( ( ( org . apache . wss4j . common . ConfigurationConstants . ENCRYPT ) + "<sp>" ) + ( org . apache . wss4j . common . ConfigurationConstants . SIGNATURE ) ) + "<sp>" ) + ( org . apache . wss4j . common . ConfigurationConstants . TIMESTAMP ) ) + "<sp>" ) + (... | org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) ) |
testForcePullImageFalse ( ) { org . apache . flink . configuration . Configuration config = new org . apache . flink . configuration . Configuration ( ) ; config . setBoolean ( MesosTaskManagerParameters . MESOS_RM_CONTAINER_DOCKER_FORCE_PULL_IMAGE , false ) ; org . apache . flink . mesos . runtime . clusterframework .... | org . junit . Assert . assertEquals ( params . dockerForcePullImage ( ) , false ) |
testSubLogger ( ) { listener . clear ( ) ; org . scijava . log . Logger sub = logger . subLogger ( "sub" ) ; sub . error ( "Hello<sp>World!" ) ; "<AssertPlaceHolder>" ; } hasLogged ( java . util . function . Predicate ) { return messages . stream ( ) . anyMatch ( predicate ) ; } | org . junit . Assert . assertTrue ( listener . hasLogged ( ( m ) -> m . source ( ) . path ( ) . contains ( "sub" ) ) ) |
automaticallyRefreshesModelAfterStaleElementException ( ) { java . lang . String paragraphsText = testPage . staleElementsSection . getParagraphsText ( ) ; testPage . staleElementsSection . triggerStaleElement ( ) ; "<AssertPlaceHolder>" ; } getParagraphsText ( ) { return paragraph . getText ( ) ; } | org . junit . Assert . assertEquals ( paragraphsText , testPage . staleElementsSection . getParagraphsText ( ) ) |
akkaAkka ( ) { final int NUM_MSG = 10000000 ; final akka . actor . ActorSystem system = akka . actor . ActorSystem . create ( "reactive-interop" ) ; final akka . stream . ActorMaterializer mat = akka . stream . ActorMaterializer . create ( akka . stream . ActorMaterializerSettings . create ( system ) . withInputBuffer ... | org . junit . Assert . assertTrue ( ( ( count . getCount ( ) ) == 0 ) ) |
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . vizualizers . DbMonGui instance = new kg . apc . jmeter . vizualizers . DbMonGui ( ) ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) { return this . getClass ( ... | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testDownload ( ) { java . lang . String file = "file1_downloaded.txt" ; java . nio . file . Files . write ( storage . resolve ( file ) , io . datakernel . remotefs . FsIntegrationTest . CONTENT ) ; io . datakernel . bytebuf . ByteBuf result = await ( download ( file ) ) ; "<AssertPlaceHolder>" ; } asArray ( ) { byte [ ... | org . junit . Assert . assertArrayEquals ( io . datakernel . remotefs . FsIntegrationTest . CONTENT , result . asArray ( ) ) |
whenBatchSizeDoesNotNumberOfStepsThenAllStepsShouldBeExecuted ( ) { com . graphaware . tx . executor . batch . BatchTransactionExecutor batchExecutor = new com . graphaware . tx . executor . batch . NoInputBatchTransactionExecutor ( database , 5 , 6 , com . graphaware . tx . executor . batch . CreateNode . getInstance ... | org . junit . Assert . assertEquals ( 6 , countNodes ( database ) ) |
testFindByServiceCode ( ) { java . lang . String serviceCode = "service001" ; org . oscarehr . common . model . BillingService billingService1 = createBillingServiceWithRegion ( "service001" , "ON" , "20080101" ) ; org . oscarehr . common . model . BillingService billingService2 = createBillingServiceWithRegion ( "serv... | org . junit . Assert . assertTrue ( true ) |
testChangeDefaultMode ( ) { org . glassfish . hk2 . api . ServiceLocator locator = org . glassfish . hk2 . runlevel . tests . utilities . Utilities . getServiceLocator ( org . glassfish . hk2 . runlevel . tests . ghost . Registrar . class ) ; org . glassfish . hk2 . api . ActiveDescriptor < ? > desc5 = org . glassfish ... | org . junit . Assert . assertNotNull ( locator . getService ( org . glassfish . hk2 . runlevel . tests . ghost . ServiceFive . class ) ) |
addResourceToUpdate ( ) { componentLocationUpdater . addResourceToUpdate ( resource ) ; final java . util . HashSet < org . sentilo . common . domain . SensorLocationElement > currentUpdatesAwaiting = getSetField ( componentLocationUpdater , "currentUpdatesAwaiting" ) ; "<AssertPlaceHolder>" ; } size ( ) { return isEmp... | org . junit . Assert . assertTrue ( ( ( currentUpdatesAwaiting . size ( ) ) == 1 ) ) |
activatedPrivChatShouldResetNewPrivateMessageStatusIfCurrentlyTrue ( ) { testUser . setNewPrivMsg ( true ) ; androidUserInterface . activatedPrivChat ( testUser ) ; "<AssertPlaceHolder>" ; verify ( controller ) . changeNewMessage ( 1235 , false ) ; } isNewPrivMsg ( ) { return newPrivMsg ; } | org . junit . Assert . assertFalse ( testUser . isNewPrivMsg ( ) ) |
testSetMaxAutoReconnectAttemptsForever ( ) { com . amazonaws . mobileconnectors . iot . AWSIotMqttManager testClient = new com . amazonaws . mobileconnectors . iot . AWSIotMqttManager ( "test-client" , com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) , com . amazonaws . mobileconnectors . iot . AW... | org . junit . Assert . assertEquals ( ( - 1 ) , testClient . getMaxAutoReconnectAttempts ( ) ) |
convertNullToByte ( ) { "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( destinationClass . isPrimitive ( ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToPrimitiveWrapper ( value , destinationClass ) ) ) ; } else if ( value == null ) { return null ; } else if... | org . junit . Assert . assertThat ( org . slim3 . util . ConversionUtil . convert ( null , byte . class ) , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 0 ) ) ) ) |
shouldReconnectToSameDB ( ) { jedis . select ( 1 ) ; jedis . set ( "foo" , "bar" ) ; jedis . getClient ( ) . getSocket ( ) . shutdownInput ( ) ; jedis . getClient ( ) . getSocket ( ) . shutdownOutput ( ) ; "<AssertPlaceHolder>" ; } get ( byte [ ] ) { sendCommand ( redis . clients . jedis . GET , key ) ; } | org . junit . Assert . assertEquals ( "bar" , jedis . get ( "foo" ) ) |
squarePlanarUShapeTest ( ) { org . openscience . cdk . interfaces . IAtom atomA = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 1 , 2 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomB = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 1 , 1 , 0 ) ) ; org... | org . junit . Assert . assertEquals ( SquarePlanarShape . U_SHAPE , shape ) |
synchronizeWithNoChangeShouldReturnSameState ( ) { org . communitybridge . synchronization . PlayerState newState = synchronizer . synchronize ( environment , player , USER_ID , previous , current , result ) ; "<AssertPlaceHolder>" ; } synchronize ( org . communitybridge . main . Environment , org . bukkit . entity . P... | org . junit . Assert . assertEquals ( result , newState ) |
testAlmostIntersectingRulingsShouldIntersect ( ) { technology . tabula . Ruling v = new technology . tabula . Ruling ( new java . awt . geom . Point2D . Float ( 555.9609F , 271.56964F ) , new java . awt . geom . Point2D . Float ( 555.9609F , 786.8999F ) ) ; technology . tabula . Ruling h = new technology . tabula . Rul... | org . junit . Assert . assertEquals ( m . values ( ) . size ( ) , 1 ) |
testTestSum ( ) { logger . info ( "testSum" ) ; double xsum = 65.3 ; int n = 100 ; double H0sum = 0.65 ; double std = 0.02 ; boolean is_twoTailed = false ; double aLevel = 0.05 ; boolean expResult = false ; boolean result = com . datumbox . framework . core . statistics . parametrics . onesample . NormalOneSample . tes... | org . junit . Assert . assertEquals ( expResult , result ) |
testWeld ( ) { final org . junit . runner . Result result = org . junit . runner . JUnitCore . runClasses ( junit . rules . cdi . WeldTest . UsesWeldTest . class ) ; final int failureCount = result . getFailureCount ( ) ; "<AssertPlaceHolder>" ; if ( failureCount != 0 ) { System . out . println ( ( ( "Encountered<sp>" ... | org . junit . Assert . assertEquals ( 0 , failureCount ) |
testFeatureReaderWithQueryFilter ( ) { if ( Boolean . FALSE . equals ( serviceAvailable ) ) { return ; } org . opengis . filter . Filter filter = ff . equals ( ff . property ( "NAME" ) , ff . literal ( "E<sp>58th<sp>St" ) ) ; org . geotools . data . Query query = new org . geotools . data . Query ( "tiger_tiger_roads" ... | org . junit . Assert . assertEquals ( expected , count ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFInfoEvento<sp>Id=\"ID1101108156800473487493042898372494088308929852383799\"><cOrgao>42</cOrgao><tpAmb>2</tpAmb><CNPJ>02224343323426</CNPJ><chNFe>81568004734874930428983724940883089298523837</chNFe><dhEvento>2014-01-01T10:10:10... | org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFInfoEventoCartaCorrecao ( ) . toString ( ) ) |
testDataSource2 ( ) { try ( org . mariadb . jdbc . MariaDbPoolDataSource ds = new org . mariadb . jdbc . MariaDbPoolDataSource ( ( ( hostname ) == null ? "localhost" : hostname ) , port , database ) ) { try ( java . sql . Connection connection = ds . getConnection ( username , password ) ) { "<AssertPlaceHolder>" ; } }... | org . junit . Assert . assertEquals ( connection . isValid ( 0 ) , true ) |
testGetDocumentNotInCache ( ) { when ( cache . getDocument ( q1 ) ) . thenReturn ( null ) ; when ( reader . getDocument ( q1 ) ) . thenReturn ( doc1 ) ; "<AssertPlaceHolder>" ; verify ( cache ) . add ( doc1 ) ; verify ( cache ) . getDocument ( q1 ) ; verify ( reader ) . getDocument ( q1 ) ; verifyNoMoreInteractions ( w... | org . junit . Assert . assertEquals ( doc1 , io . getDocument ( q1 ) ) |
iCanPerformUnlimitedQuery ( ) { startTransaction ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . createDocumentModel ( "/" , ( "testDoc" + i ) , "File" ) ; doc . setPropertyValue ( "dc:title" , ( "TestMe" + i ) ) ; doc = session . createDocument ( doc ) ; } org .... | org . junit . Assert . assertFalse ( page . isEmpty ( ) ) |
testDateGTTimestampCompareColummn ( ) { java . lang . String sqlText = java . lang . String . format ( "select<sp>d<sp>from<sp>%s<sp>where<sp>d<sp>><sp>'1988-11-24<sp>00:00:00'" , com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . QUALIFIED_TABLE_NAME ) ; try ( java . sql . Resul... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
ASIPMessage_CompareInToOutMessageInsert_success ( ) { java . lang . String rawInput = "Hello<sp>ASIP." ; net . sharkfw . knowledgeBase . SharkKB kb = new net . sharkfw . knowledgeBase . inmemory . InMemoSharkKB ( ) ; net . sharkfw . asip . ASIPSpace space = kb . createASIPSpace ( topics , types , peers , sender , peers... | org . junit . Assert . assertTrue ( rawInput . equals ( receivedContent ) ) |
testGetJarFileNameWrappers ( ) { classUnderTest . setJarFileNameWrappers ( null ) ; "<AssertPlaceHolder>" ; } getJarFileNameWrappers ( ) { System . err . println ( "MockSQLDriver.getJarFileNameWrappers:<sp>stub<sp>not<sp>yet<sp>implemented" ) ; return null ; } | org . junit . Assert . assertTrue ( ( ( classUnderTest . getJarFileNameWrappers ( ) . length ) == 0 ) ) |
testSetFieldType ( ) { org . pentaho . hbase . shim . api . ColumnFilter cf = new org . pentaho . hbase . shim . api . ColumnFilterTest ( ) ; cf . setFieldType ( "test" ) ; "<AssertPlaceHolder>" ; } setFieldType ( java . lang . String ) { m_fieldType = type ; } | org . junit . Assert . assertEquals ( "test" , cf . m_fieldType ) |
testSerialization ( ) { org . jfree . data . function . PowerFunction2D f1 = new org . jfree . data . function . PowerFunction2D ( 1.0 , 2.0 ) ; org . jfree . data . function . PowerFunction2D f2 = ( ( org . jfree . data . function . PowerFunction2D ) ( org . jfree . chart . TestUtils . serialised ( f1 ) ) ) ; "<Assert... | org . junit . Assert . assertEquals ( f1 , f2 ) |
testMaterieelHistorischLeverenMagMaterieelEnFormeel ( ) { final java . util . Set < nl . bzk . brp . model . algemeen . stamgegeven . autaut . DienstbundelGroep > dienstbundelGroepen = new java . util . HashSet ( ) ; final nl . bzk . brp . model . hisvolledig . predikaat . MagHistorieTonenPredikaat predikaat = new nl .... | org . junit . Assert . assertThat ( gefilterdeModellen . size ( ) , org . hamcrest . Matchers . is ( 3 ) ) |
shouldFailWebSocketConnectionWhenServerSendOpcode5Frame ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org .... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
shouldReadWriteVerticesNoEdgesToGraphSONManual ( ) { org . junit . Assume . assumeThat ( ioType , org . hamcrest . core . StringStartsWith . startsWith ( "graphson" ) ) ; try ( final java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ) { final org . apache . tinkerpop . gremlin . structure... | org . junit . Assert . assertEquals ( 2 , called . get ( ) ) |
getsAndSetsId ( ) { com . mpatric . mp3agic . ID3v2ChapterTOCFrameData frameData = new com . mpatric . mp3agic . ID3v2ChapterTOCFrameData ( false ) ; frameData . setId ( "My<sp>ID" ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( "My<sp>ID" , frameData . getId ( ) ) |
testBuscarPosicaoNegativa ( ) { br . com . senacrs . alp . aulas . MinhaListaImp < java . lang . String > obj = null ; obj = criarMinhaListaImp ( ) ; try { obj . buscar ( ( - 1 ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { "<AssertPlaceHolder>" ; } } buscar ( int ) { re... | org . junit . Assert . assertTrue ( true ) |
testGetFirstNonNull_int ( ) { int first = 1 ; int second = 2 ; int third = 3 ; int fourth = 4 ; int expResult = 1 ; int result = com . adobe . acs . commons . util . TextUtil . getFirstNonNull ( first , second , third , fourth ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testGetMaskCount ( ) { org . sagebionetworks . repo . model . table . QueryOptions options = new org . sagebionetworks . repo . model . table . QueryOptions ( ) . withRunCount ( true ) ; long mask = options . getPartMask ( ) ; "<AssertPlaceHolder>" ; } getPartMask ( ) { long partMask = 0 ; if ( this . runQuery ) { part... | org . junit . Assert . assertEquals ( QueryOptions . BUNDLE_MASK_QUERY_COUNT , mask ) |
testSessionEnding ( ) { net . sourceforge . squirrel_sql . plugins . dbcopy . DBCopyPlugin plugin = ( ( net . sourceforge . squirrel_sql . plugins . dbcopy . DBCopyPlugin ) ( super . classUnderTest ) ) ; plugin . setSourceSession ( mockSession ) ; plugin . sessionEnding ( mockSession ) ; "<AssertPlaceHolder>" ; } getSo... | org . junit . Assert . assertNull ( plugin . getSourceSession ( ) ) |
testUnion4 ( ) { fr . inria . corese . core . Graph g1 = fr . inria . corese . core . Graph . create ( ) ; fr . inria . corese . core . query . QueryProcess exec1 = fr . inria . corese . core . query . QueryProcess . create ( g1 ) ; java . lang . String i1 = "function<sp>us:test(){" 0 + ( ( "us:John<sp>foaf:knows<sp>us... | org . junit . Assert . assertEquals ( 4 , m . size ( ) ) |
stopUrlShouldBeReturned ( ) { addLinkToList ( org . eclipse . che . ide . ext . runner . client . models . LINK_REL_STOP , org . eclipse . che . ide . ext . runner . client . models . RunnerImplTest . URL ) ; when ( descriptor . getLinks ( ) ) . thenReturn ( links ) ; runner . setProcessDescriptor ( descriptor ) ; "<As... | org . junit . Assert . assertThat ( runner . getApplicationURL ( ) , org . hamcrest . core . Is . is ( org . eclipse . che . ide . ext . runner . client . models . RunnerImplTest . URL ) ) |
testSingleRecord ( ) { no . priv . garshol . duke . matchers . Record r1 = makeRecord ( "id" , "1" ) ; no . priv . garshol . duke . matchers . Record r2 = makeRecord ( "id" , "2" ) ; listener . startProcessing ( ) ; listener . batchReady ( 1 ) ; listener . matches ( r1 , r2 , 0.95 ) ; listener . batchDone ( ) ; listene... | org . junit . Assert . assertEquals ( 1 , all . size ( ) ) |
testGeospatialPredicateNullMetadata ( ) { java . lang . String methodName = "testGeospatialPredicateNullMetadata()" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( ( ( "***************<sp>START:<sp>" + methodName ) + "<sp>*****************" ) ) ; java . lang . String geometryWkt = "POLYGON<sp>((40<sp>34,<sp... | org . junit . Assert . assertTrue ( predicate . matches ( testEvent ) ) |
shouldReturnEmptyIteratorIfNoData ( ) { final org . apache . kafka . streams . state . WindowStoreIterator < java . lang . String > iterator = windowStore . fetch ( "my-key" , ofEpochMilli ( 0L ) , ofEpochMilli ( 25L ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return false ; } | org . junit . Assert . assertEquals ( false , iterator . hasNext ( ) ) |
testIsMaxVectorCase ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 4 , 3 } , new long [ ] { 2 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new boolean [ ] { false ... | org . junit . Assert . assertEquals ( assertion , test ) |
testThatVerificationFailsIfTheProductDoesNotIntersectTheTargetArea ( ) { org . powermock . api . mockito . PowerMockito . when ( org . esa . beam . statistics . percentile . interpolated . Utils . createProductArea ( any ( org . esa . beam . framework . datamodel . Product . class ) ) ) . thenReturn ( _nonIntersectingA... | org . junit . Assert . assertEquals ( false , result ) |
testITableExists ( ) { System . out . println ( "iTableExists" ) ; com . pearson . docussandra . domain . objects . Index index = com . pearson . docussandra . testhelper . Fixtures . createTestIndexOneField ( ) ; com . pearson . docussandra . persistence . ITableRepository cleanUpInstance = new com . pearson . docussa... | org . junit . Assert . assertEquals ( expResult , result ) |
shouldHandleReasonableDateRange ( ) { final int currentCycle = DefaultCycleCalculator . INSTANCE . currentCycle ( cycle , timeProvider , 0 ) ; for ( long nowMillis = 1500000000000L ; nowMillis < 2000000000000L ; nowMillis += 3.0E10 ) { clock . set ( nowMillis ) ; long index = cycle . toIndex ( currentCycle , 0 ) ; "<As... | org . junit . Assert . assertEquals ( currentCycle , cycle . toCycle ( index ) ) |
testWeekDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>WEEK(d)<sp>as<sp>\"WEEK\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) )... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testBuildWithDisabledDefaultConstaitns ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . type . DepartmentType context = new org . lnu . is . domain . department . type . DepartmentType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>DepartmentType<sp... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
findDocNamesTest ( ) { include = com . google . common . collect . ImmutableList . of ( "**/**StringResource_en_US*" ) ; when ( mockPushOption . getLocaleMapList ( ) ) . thenReturn ( locales ) ; when ( mockPushOption . getSourceLang ( ) ) . thenReturn ( org . zanata . client . commands . push . XliffPushStrategyTest . ... | org . junit . Assert . assertEquals ( 3 , localDocNames . size ( ) ) |
debugMdcThrowableMessageArgs ( ) { uk . org . lidalia . slf4jtest . LoggingEvent event = uk . org . lidalia . slf4jtest . LoggingEvent . debug ( mdc , throwable , message , arg1 , arg2 ) ; uk . org . lidalia . slf4jtest . LoggingEvent expected = new uk . org . lidalia . slf4jtest . LoggingEvent ( DEBUG , mdc , throwabl... | org . junit . Assert . assertThat ( event , org . hamcrest . core . Is . is ( expected ) ) |
testBuildWithFullEntityWithOrderBy ( ) { org . lnu . is . domain . admin . unit . AdminUnit parent = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . domain . admin . unit . type . AdminUnitType adminUnitType = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; java . l... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testBasic ( ) { java . util . Map < com . google . devtools . depan . nodes . filters . model . ContextKey , java . lang . Object > testData = com . google . common . collect . Maps . newHashMap ( ) ; java . lang . String testValue = "Any<sp>object" ; testData . put ( Base . UNIVERSE , testValue ) ; com . google . devt... | org . junit . Assert . assertEquals ( testValue , testContext . get ( Base . UNIVERSE ) ) |
testIsSatisfiedByTrue ( ) { when ( specification . isSatisfiedBy ( fact ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } isSatisfiedBy ( T ) { return ! ( spec1 . isSatisfiedBy ( t ) ) ; } | org . junit . Assert . assertFalse ( instance . isSatisfiedBy ( fact ) ) |
nothingEverPressed ( ) { monitor . down = false ; monitor . update ( ) ; "<AssertPlaceHolder>" ; } monitor ( boolean , boolean , boolean ) { return new com . gemserk . componentsengine . input . ButtonMonitorTest . MonitorMatcher ( isPressed , isReleased , isHolded ) ; } | org . junit . Assert . assertThat ( monitor , com . gemserk . componentsengine . input . ButtonMonitorTest . MonitorMatcher . monitor ( false , false , false ) ) |
testEnumAsInlineUnion ( ) { final cz . habarta . typescript . generator . Settings settings = cz . habarta . typescript . generator . TestUtils . settings ( ) ; settings . quotes = "'" ; settings . mapEnum = EnumMapping . asInlineUnion ; final java . lang . String output = new cz . habarta . typescript . generator . Ty... | org . junit . Assert . assertEquals ( expected , output ) |
testSoapV1_2Marshal ( ) { final org . apache . camel . dataformat . soap . SoapJaxbDataFormat format = new org . apache . camel . dataformat . soap . SoapJaxbDataFormat ( ) ; format . setContextPath ( "org.wildfly.camel.test.jaxb.model" ) ; org . apache . camel . CamelContext camelctx = new org . apache . camel . impl ... | org . junit . Assert . assertEquals ( expected , org . wildfly . camel . test . common . utils . XMLUtils . compactXML ( customerXML ) ) |
testUnauthorizedWrite ( ) { java . util . Properties producerProps = new java . util . Properties ( ) ; producerProps . put ( "bootstrap.servers" , ( "localhost:" + ( org . apache . ranger . authorization . kafka . authorizer . KafkaRangerAuthorizerGSSTest . port ) ) ) ; producerProps . put ( "acks" , "bootstrap.server... | org . junit . Assert . assertTrue ( ex . getMessage ( ) . contains ( "bootstrap.servers" 2 ) ) |
getValueMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveThermostatFanModeCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveThermostatFanModeCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_THERMOSTAT_FAN_MODE ) ) )... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV1 ) ) |
test_overridesPresent_exceedAvailable_fails ( ) { java . util . Properties properties = new java . util . Properties ( ) ; java . lang . Integer [ ] expectedPorts = new java . lang . Integer [ ] { 9990 , 9991 , 9992 , 9993 , 9994 } ; properties . setProperty ( TestPortFinder . UNUSED_PORTS_PROPERTY_KEY , com . google .... | org . junit . Assert . assertEquals ( expectedPort , actualPort ) |
testLazyString ( ) { java . lang . String value = "TEN" ; subject = makeSimpleCallable ( value ) ; "<AssertPlaceHolder>" ; } value ( ) { return internalValue ; } | org . junit . Assert . assertEquals ( value , subject . value ( ) ) |
testSaveAndRename ( ) { final java . util . function . Supplier pathSupplier = mock ( java . util . function . Supplier . class ) ; final org . uberfire . ext . editor . commons . client . validation . Validator renameValidator = mock ( org . uberfire . ext . editor . commons . client . validation . Validator . class )... | org . junit . Assert . assertEquals ( command , saveAndRenameCommand ) |
whenCreatingDockerClientWithProperties_thenReturnInstance ( ) { java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( "registry.email" , "info@bealdung.com" ) ; properties . setProperty ( "info@bealdung.com" 1 , "register.bealdung.io/v2/" ) ; properties . setProperty ( "inf... | org . junit . Assert . assertNotNull ( dockerClient ) |
testSetAndGetValue ( ) { doCallRealMethod ( ) . when ( condition ) . setValue ( any ( java . lang . String [ ] . class ) ) ; when ( condition . getValue ( ) ) . thenCallRealMethod ( ) ; condition . setValue ( values ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; } | org . junit . Assert . assertEquals ( condition . getValue ( ) , values ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.