input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetBillingErrorsListTrim ( ) { org . oscarehr . common . model . BillingONEAReport eaRpt = createReport ( 1 ) ; eaRpt . setClaimError ( "<sp>" ) ; eaRpt . setCodeError ( "<sp>error02<sp>" ) ; dao . persist ( eaRpt ) ; java . util . List < java . lang . String > eaReportErrors = dao . getBillingErrorList ( eaRpt . g... | org . junit . Assert . assertEquals ( eaReportErrors , expectedList ) |
mustIgnoreMessagesComingInForActorsThatDontExist ( ) { fixture . store ( new com . offbynull . actors . shuttle . Message ( "actor:a:1:2:3" , "actor:b:2:3:4" , "payload" ) , new com . offbynull . actors . shuttle . Message ( "actor:a:1:2:3" , "actor:b:2:3:4" , "payload" ) , new com . offbynull . actors . shuttle . Mess... | org . junit . Assert . assertEquals ( 0 , fixture . getStoredMessageCount ( ) ) |
testBinsAccordingToPartitioner ( ) { final org . apache . nifi . controller . queue . clustered . partition . FlowFilePartitioner partitioner = new org . apache . nifi . controller . queue . clustered . TestSocketLoadBalancedFlowFileQueue . StaticFlowFilePartitioner ( 1 ) ; queue . setFlowFilePartitioner ( partitioner ... | org . junit . Assert . assertSame ( desiredPartition , partition ) |
testInvalidSpdyWindowUpdateFrameLength ( ) { short type = 9 ; byte flags = 0 ; int length = 12 ; int streamId = ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ; int deltaWindowSize = ( ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( )... | org . junit . Assert . assertFalse ( buf . isReadable ( ) ) |
testAllHMAC ( ) { final net . schmizz . sshj . DefaultConfig defaultConfig = new net . schmizz . sshj . DefaultConfig ( ) ; defaultConfig . setMACFactories ( new net . schmizz . sshj . transport . mac . HMACSHA2256 . Factory ( ) , new net . schmizz . sshj . transport . mac . HMACSHA2512 . Factory ( ) ) ; for ( net . sc... | org . junit . Assert . assertTrue ( client . isConnected ( ) ) |
testDataAccessFinderFindsIt ( ) { java . util . Iterator < org . geotools . data . DataAccessFactory > allFactories = org . geotools . data . DataAccessFinder . getAllDataStores ( ) ; org . geotools . arcsde . ArcSDEJNDIDataStoreFactory sdeFac = null ; while ( allFactories . hasNext ( ) ) { org . geotools . data . Data... | org . junit . Assert . assertNotNull ( sdeFac ) |
testFindUserDnWhenUserDnPositive ( ) { javax . naming . NamingEnumeration < javax . naming . directory . SearchResult > searchResult = mockNamingEnumeration ( "CN=User1,OU=org1,DC=foo,DC=bar" ) ; when ( ctx . search ( anyString ( ) , anyString ( ) , any ( javax . naming . directory . SearchControls . class ) ) ) . then... | org . junit . Assert . assertEquals ( expected , actual ) |
testDeselectArrayWithWithIndicesOutsideSelection ( ) { org . eclipse . swt . widgets . Table table = createTable ( SWT . SINGLE , 1 ) ; org . eclipse . swt . widgets . Table_Test . createTableItems ( table , 2 ) ; table . setSelection ( 1 ) ; table . deselect ( new int [ ] { 1 , 777 } ) ; "<AssertPlaceHolder>" ; } getS... | org . junit . Assert . assertEquals ( 0 , table . getSelectionCount ( ) ) |
testSerialization ( ) { org . jfree . chart . axis . CyclicNumberAxis a1 = new org . jfree . chart . axis . CyclicNumberAxis ( 10 , 0 , "Test<sp>Axis" ) ; org . jfree . chart . axis . CyclicNumberAxis a2 = ( ( org . jfree . chart . axis . CyclicNumberAxis ) ( org . jfree . chart . TestUtils . serialised ( a1 ) ) ) ; "<... | org . junit . Assert . assertEquals ( a1 , a2 ) |
toList3 ( ) { int [ ] ids = new int [ ] { 1 , 2 , 3 } ; java . util . List < java . lang . Object > objects = org . fastquery . util . TypeUtil . toList ( ids ) ; for ( int i = 0 ; i < ( ids . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } toList ( java . lang . Object ) { java . util . Objects . requireNonNull ( arra... | org . junit . Assert . assertThat ( ids [ i ] , is ( objects . get ( i ) ) ) |
canBeNull ( ) { toDoItem . setDueBy ( ( ( org . joda . time . LocalDate ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getDueBy ( ) { return dueBy ; } | org . junit . Assert . assertThat ( toDoItem . getDueBy ( ) , org . hamcrest . CoreMatchers . is ( ( ( org . joda . time . LocalDate ) ( null ) ) ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . asset . kernel . model . AssetLink newAssetLink = addAssetLink ( ) ; com . liferay . asset . kernel . model . AssetLink existingAssetLink = _persistence . fetchByPrimaryKey ( newAssetLink . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _am... | org . junit . Assert . assertEquals ( existingAssetLink , newAssetLink ) |
testBNonExpression ( ) { org . jboss . as . server . RuntimeExpressionResolver testee = new org . jboss . as . server . RuntimeExpressionResolver ( org . jboss . as . server . RuntimeExpressionResolverUnitTestCase . getVaultReader ( ) ) ; org . jboss . dmr . ModelNode value = new org . jboss . dmr . ModelNode ( org . j... | org . junit . Assert . assertEquals ( value , testee . resolveExpressions ( value ) ) |
testFindByConnectorNamesWithEmpty ( ) { java . util . List < org . apache . griffin . core . measure . entity . DataConnector > connectors = dcRepo . findByConnectorNames ( new java . util . ArrayList ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( connectors . size ( ) , 0 ) |
testGet_InZK ( ) { org . apache . accumulo . core . conf . Property p = org . apache . accumulo . core . conf . Property . INSTANCE_SECRET ; expect ( zc . get ( ( ( ( ( ( ( ( org . apache . accumulo . fate . zookeeper . ZooUtil . getRoot ( iid ) ) + ( org . apache . accumulo . core . Constants . ZTABLES ) ) + "/" ) + (... | org . junit . Assert . assertEquals ( "sekrit" , c . get ( Property . INSTANCE_SECRET ) ) |
testSelectFileFromRepositoryTask ( ) { org . pentaho . reporting . designer . extensions . pentaho . repository . actions . SelectFileFromRepositoryTask task = new org . pentaho . reporting . designer . extensions . pentaho . repository . actions . SelectFileFromRepositoryTask ( uiContext ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( task ) |
test_getManifest_dir ( ) { java . util . jar . Manifest manifest = org . talend . commons . utils . resource . BundleFileUtil . getManifest ( tmpFolder ) ; "<AssertPlaceHolder>" ; } getManifest ( java . io . File ) { if ( ( ( ( f == null ) || ( ! ( f . exists ( ) ) ) ) || ( ! ( f . isFile ( ) ) ) ) || ( ! ( f . getName... | org . junit . Assert . assertNull ( manifest ) |
testUnmarshallMarshallXmlCompare ( ) { org . drugis . addis . entities . data . AddisData data = org . drugis . addis . util . jaxb . JAXBHandler . unmarshallAddisData ( org . drugis . addis . util . jaxb . JAXBConvertor . transformToLatest ( org . drugis . addis . util . jaxb . JAXBHandlerTest . class . getResourceAsS... | org . junit . Assert . assertEquals ( data , data_clone ) |
testComputationState ( ) { if ( runningInDistributedMode ( ) ) { System . out . println ( "testComputeContext:<sp>Ignore<sp>this<sp>test<sp>in<sp>distributed<sp>mode." ) ; return ; } org . apache . giraph . conf . GiraphConfiguration conf = new org . apache . giraph . conf . GiraphConfiguration ( ) ; conf . setComputat... | org . junit . Assert . assertTrue ( job . run ( true ) ) |
testSubsituteSqlMalicious ( ) { java . util . Map < java . lang . String , java . lang . String > variables = new java . util . HashMap ( ) ; variables . put ( "level" , ";<sp>delete<sp>from<sp>datavalue;" ) ; java . lang . String sql = "select<sp>*<sp>from<sp>datavalue<sp>where<sp>level=${level}" ; java . lang . Strin... | org . junit . Assert . assertEquals ( expected , actual ) |
testExecuteRemoteOperation ( ) { akka . actor . ActorRef shardActorRef = getSystem ( ) . actorOf ( akka . actor . Props . create ( org . opendaylight . controller . cluster . raft . utils . EchoActor . class ) ) ; akka . actor . ActorRef shardManagerActorRef = getSystem ( ) . actorOf ( org . opendaylight . controller .... | org . junit . Assert . assertEquals ( "hello" , out ) |
testTXDeletionInExonReverse ( ) { de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( new de . charite . compbio . jannovar . reference . GenomePosition ( de . charite . compbio . jannovar . reference . TranscriptSequenceChangeHelper... | org . junit . Assert . assertEquals ( expectedBuilder . toString ( ) , resultTranscript ) |
testMvNotDestExists ( ) { java . io . File src = mock ( java . io . File . class ) ; java . io . File dest = mock ( java . io . File . class ) ; java . io . File parent = mock ( java . io . File . class ) ; expect ( src . exists ( ) ) . andReturn ( true ) . anyTimes ( ) ; expect ( src . isDirectory ( ) ) . andReturn ( ... | org . junit . Assert . assertNull ( ret ) |
testRegionTooBusyException ( ) { java . util . List < java . lang . Throwable > ts = new java . util . ArrayList ( 1 ) ; final java . lang . String regionName = this . name . getMethodName ( ) ; ts . add ( new org . apache . hadoop . hbase . RegionTooBusyException ( regionName ) ) ; java . util . List < org . apache . ... | org . junit . Assert . assertTrue ( ree . toString ( ) . contains ( regionName ) ) |
completePasswordRecovery_SendMailFailed ( ) { doThrow ( new org . oscm . internal . types . exception . MailOperationException ( ) ) . when ( passwordRecoverybean ) . sendPasswordRecoveryMails ( any ( org . oscm . domobjects . PlatformUser . class ) , any ( org . oscm . types . enumtypes . EmailType . class ) , anyStri... | org . junit . Assert . assertEquals ( false , result ) |
shouldDeleteFoundFlowPath ( ) { org . openkilda . model . FlowPath flowPath = buildTestFlowPath ( org . openkilda . persistence . repositories . impl . Neo4jFlowPathRepositoryTest . TEST_FLOW_ID , switchA , switchB ) ; org . openkilda . persistence . repositories . impl . Neo4jFlowPathRepositoryTest . flowPathRepositor... | org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . repositories . impl . Neo4jFlowPathRepositoryTest . flowPathRepository . findAll ( ) . size ( ) ) |
shouldDisableQuotaServiceBecausePropertyIsTrue ( ) { givenQuotaProperty ( "true" ) ; final boolean matches = service . matches ( context , null ) ; "<AssertPlaceHolder>" ; } matches ( org . springframework . context . annotation . ConditionContext , org . springframework . core . type . AnnotatedTypeMetadata ) { final ... | org . junit . Assert . assertFalse ( matches ) |
testSpecificToFromByteBufferWithLogicalTypes ( ) { org . apache . avro . specific . TestRecordWithLogicalTypes record = new org . apache . avro . specific . TestRecordWithLogicalTypes ( true , 34 , 35L , 3.14F , 3019.34 , null , org . joda . time . LocalDate . now ( ) , org . joda . time . LocalTime . now ( ) , org . j... | org . junit . Assert . assertEquals ( record , copy ) |
testSelectDrillTargetTask ( ) { org . pentaho . reporting . designer . extensions . pentaho . drilldown . SelectDrillTargetTask selectDrillTargetTask = new org . pentaho . reporting . designer . extensions . pentaho . drilldown . SelectDrillTargetTask ( wrapper , uiContext , triggerRefreshParameterTask , activeContext ... | org . junit . Assert . assertNotNull ( selectDrillTargetTask ) |
setBothRemovedTest ( ) { org . threadly . concurrent . collections . ConcurrentArrayList . DataSet < java . lang . Integer > result = org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . removedFromBoth . set ( 8 , 100 ) . set ( 5 , 0 ) . set ( 0 , 10 ) ; java . lang . Integer [ ] expectedResult... | org . junit . Assert . assertTrue ( result . equals ( org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . makeDataSet ( expectedResult , 0 , expectedResult . length ) ) ) |
createBranchFromBranchRef_theHeadsOfTheTwoBranchesShouldEqual ( ) { writeSomethingToCache ( ) ; commitToBranch ( "source_branch" ) ; com . beijunyi . parallelgit . utils . BranchUtils . createBranch ( "test_branch" , repo . findRef ( "source_branch" ) , repo ) ; "<AssertPlaceHolder>" ; } getHeadCommit ( java . lang . S... | org . junit . Assert . assertEquals ( com . beijunyi . parallelgit . utils . BranchUtils . getHeadCommit ( "source_branch" , repo ) , com . beijunyi . parallelgit . utils . BranchUtils . getHeadCommit ( "test_branch" , repo ) ) |
test ( ) { nl . bzk . brp . bevraging . domein . Land land = new nl . bzk . brp . bevraging . domein . Land ( "Test" ) ; "<AssertPlaceHolder>" ; } getNaam ( ) { return naam ; } | org . junit . Assert . assertEquals ( "Test" , land . getNaam ( ) ) |
testGetPriorityFromMessage ( ) { final short PRIORITY = 7 ; org . apache . qpid . proton . message . impl . MessageImpl protonMessage = ( ( org . apache . qpid . proton . message . impl . MessageImpl ) ( Message . Factory . create ( ) ) ) ; protonMessage . setHeader ( new org . apache . qpid . proton . amqp . messaging... | org . junit . Assert . assertEquals ( PRIORITY , decoded . getPriority ( ) ) |
useFullyInitializedSUTClassExtendingGenericBaseClass ( ) { mockit . TestedClassWithGenericsTest . AnotherDep anotherDep = sut2 . dep ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( anotherDep ) |
testGetEmptyNotificationsWhenHmsReturnsANullResponse ( ) { org . apache . sentry . provider . db . service . persistent . SentryStore store = org . mockito . Mockito . mock ( org . apache . sentry . provider . db . service . persistent . SentryStore . class ) ; org . apache . sentry . service . thrift . HiveConnectionF... | org . junit . Assert . assertTrue ( events . isEmpty ( ) ) |
shouldAcceptAlgorithm ( ) { lb = new org . openstack . atlas . api . validation . validators . LoadBalancer ( ) ; lb . setAlgorithm ( "RANDOM" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . PUT ) ;... | org . junit . Assert . assertTrue ( result . passedValidation ( ) ) |
testGETWhenEnabled ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; config . setProperty ( Key . ADMIN_ENABLED , true ) ; edu . illinois . library . cantaloupe . http . Response response = client . send ( ) ;... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
getAnnotatedQuery_should_work_with_repetitive_field_in_select_statement ( ) { org . springframework . data . simpledb . query . SimpleDbQueryMethod repositoryMethod = prepareQueryMethodToTest ( "selectTricky" , org . springframework . data . simpledb . query . SampleEntity . class ) ; java . lang . String expectedResul... | org . junit . Assert . assertEquals ( expectedResult , repositoryMethod . getAnnotatedQuery ( ) ) |
testGetAndTagNoHits ( ) { when ( writer . getAndTag ( q1 , "tag" ) ) . thenReturn ( null ) ; when ( cache . getAndTag ( q1 , "tag" ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; verify ( cache , never ( ) ) . add ( any ( com . findwise . hydra . DatabaseDocument . class ) ) ; verify ( cache , atLeastOnce ( ) ) . g... | org . junit . Assert . assertNull ( io . getAndTag ( q1 , "tag" ) ) |
stripQueryUTF ( ) { java . lang . String jaString = "日本語文字列" ; "<AssertPlaceHolder>" ; } stripQuery ( java . lang . String ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; org . drizzle . jdbc . internal . common . Utils . ParsingState parsingState = org . drizzle . jdbc . internal . com... | org . junit . Assert . assertEquals ( jaString , org . drizzle . jdbc . internal . common . Utils . stripQuery ( jaString ) ) |
test_simpleBase_baseIsNotChanged ( ) { de . fesere . hypermedia . cj . model . builder . UriConstructor constructor = new de . fesere . hypermedia . cj . model . builder . UriConstructor ( base ) ; "<AssertPlaceHolder>" ; } getBase ( ) { return base ; } | org . junit . Assert . assertThat ( base , org . hamcrest . core . Is . is ( org . hamcrest . CoreMatchers . equalTo ( constructor . getBase ( ) ) ) ) |
testAddIsolatedRestriction ( ) { org . apache . jackrabbit . oak . util . NodeUtil node = getTestRoot ( ) ; org . apache . jackrabbit . oak . util . NodeUtil restriction = node . addChild ( "isolatedRestriction" , org . apache . jackrabbit . oak . security . authorization . accesscontrol . NT_REP_RESTRICTIONS ) ; try {... | org . junit . Assert . assertTrue ( e . isAccessControlViolation ( ) ) |
testReadFileWithVar ( ) { java . lang . String str = org . onetwo . common . file . FileUtils . readAsStringWith ( "test.txt" , "startDate" , "2012-12-25" , "userName" , "way" ) ; System . out . println ( ( "test:" + str ) ) ; java . lang . String content = "2012-12-25wayway" ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( content , str ) |
whenSchemaVersionTableIsEmptyThenCurrentVersionShouldBe0 ( ) { expectRetrieveEmptyCurrentVersion ( ) ; int currentVersion = versioner . getCurrentVersion ( io . smartcat . migration . MigrationType . SCHEMA ) ; "<AssertPlaceHolder>" ; } getCurrentVersion ( io . smartcat . migration . MigrationType ) { final com . datas... | org . junit . Assert . assertThat ( currentVersion , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testGetMaxResonStruc ( ) { org . openscience . cdk . charges . Electronegativity pe = new org . openscience . cdk . charges . Electronegativity ( ) ; "<AssertPlaceHolder>" ; } getMaxResonStruc ( ) { return maxRS ; } | org . junit . Assert . assertSame ( 50 , pe . getMaxResonStruc ( ) ) |
nietValideGeenSoortDienst ( ) { final nl . bzk . brp . model . internbericht . ProtocolleringOpdracht protocolleringOpdracht = maakProtocolleringOpdracht ( null , datumMaterieelSelectie , datumAanvangMaterielePeriode , datumEindeMaterielePeriode , datumTijdAanvangFormelePeriode , datumTijdEindeFormelePeriode , null ) ;... | org . junit . Assert . assertFalse ( protocolleringOpdracht . isValide ( ) ) |
getWithParameters ( ) { final java . lang . String path = "/data" ; final org . sentilo . common . rest . RequestContext rc = new org . sentilo . common . rest . RequestContext ( path ) ; rc . setParameters ( requestParameters ) ; final java . lang . String responseContent = "Lorem<sp>ipsum" ; final org . apache . http... | org . junit . Assert . assertEquals ( responseContent , result ) |
testWriteLoadProtoFromStream ( ) { java . io . FileOutputStream out = new java . io . FileOutputStream ( new java . io . File ( ( ( org . apache . tajo . util . TestFileUtils . TEST_PATH ) + "/file.bin" ) ) ) ; org . apache . tajo . util . FileUtil . writeProto ( out , proto ) ; java . io . FileInputStream in = new jav... | org . junit . Assert . assertEquals ( proto , message ) |
testSessionNotPropagated ( java . net . URL ) { final java . net . URL url = com . amadeus . session . servlet . it . Helpers . url ( baseURL , "TestServlet" , "testSessionNotPropagated" ) ; java . net . HttpURLConnection connection = ( ( java . net . HttpURLConnection ) ( url . openConnection ( ) ) ) ; java . util . L... | org . junit . Assert . assertFalse ( originalCookie . equals ( cookies . get ( 0 ) ) ) |
401 ( ) { java . lang . String cellName1 = "passcell1" ; java . lang . String cellName2 = "passcell2" ; try { com . fujitsu . dc . test . utils . CellUtils . create ( cellName1 , com . fujitsu . dc . test . jersey . cell . auth . MyPasswordTest . MASTER_TOKEN , 201 ) ; com . fujitsu . dc . test . utils . CellUtils . cr... | org . junit . Assert . assertEquals ( 401 , res . getStatusCode ( ) ) |
constructor_BaseUrlHTTPS_empty ( ) { org . oscm . saml2 . api . SpMetadataGenerator mdGen = new org . oscm . saml2 . api . SpMetadataGenerator ( org . oscm . saml2 . api . SpMetadataGeneratorTest . ENTITY_ID , "<sp>" , org . oscm . saml2 . api . SpMetadataGeneratorTest . ACS1 ) ; org . w3c . dom . Document metadata = m... | org . junit . Assert . assertNull ( location ) |
testMemPipelineWriteSequenceFile_PTable ( ) { final org . apache . crunch . impl . mem . collect . MemTable < java . lang . Integer , java . lang . String > collection = new org . apache . crunch . impl . mem . collect . MemTable < java . lang . Integer , java . lang . String > ( org . apache . crunch . impl . mem . Me... | org . junit . Assert . assertEquals ( org . apache . crunch . impl . mem . MemPipelineFileReadingWritingIT . EXPECTED_TABLE , actual ) |
manageOperations_VSERVERS_STARTING_CombinedVServerStateNotNormal ( ) { paramHandler . getIaasContext ( ) . setVSystemStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . NORMAL ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageOperations ( org . oscm . app . iaas . VSystemProce... | org . junit . Assert . assertNull ( newState ) |
DeclarationVariableLocal_Initialized ( ) { java . lang . String fromClass = "Domain.Direct.Violating.DeclarationVariableLocal_Initialized" ; java . lang . String toClass = "Technology.Direct.Dao.ProfileDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . Stri... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
shouldReturnFalseForCloseSquareBracket ( ) { 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... | org . junit . Assert . assertEquals ( false , start ) |
testOnErrorWhenFileDoesNotExist ( ) { final org . jboss . errai . bus . client . api . messaging . Message message = mock ( org . jboss . errai . bus . client . api . messaging . Message . class ) ; final java . lang . Throwable throwable = mock ( java . lang . Throwable . class ) ; final org . uberfire . ext . editor ... | org . junit . Assert . assertTrue ( error ) |
testLoadAClass ( ) { org . glassfish . hk2 . api . HK2Loader loader = new org . glassfish . hk2 . utilities . HK2LoaderImpl ( ) ; java . lang . Class < ? > loaded = loader . loadClass ( "org.glassfish.hk2.tests.utilities.hk2loader.SimpleService" ) ; "<AssertPlaceHolder>" ; } loadClass ( java . lang . String ) { throw n... | org . junit . Assert . assertNotNull ( loaded ) |
testUncleInLawIsAssignableFromChild ( ) { final org . jboss . errai . codegen . meta . MetaClass metaChild = getMetaClass ( org . jboss . errai . codegen . test . model . tree . Child . class ) ; final org . jboss . errai . codegen . meta . MetaClass metaUncleInLaw = getMetaClass ( org . jboss . errai . codegen . test ... | org . junit . Assert . assertTrue ( metaUncleInLaw . isAssignableFrom ( metaChild ) ) |
testRetryOnce ( ) { org . easymock . EasyMock . expect ( mockService . makeRequest ( org . easymock . EasyMock . isNull ( ) , org . easymock . EasyMock . isNull ( ) ) ) . andThrow ( new java . io . IOException ( ) ) . once ( ) ; org . easymock . EasyMock . expect ( mockService . makeRequest ( org . easymock . EasyMock ... | org . junit . Assert . assertNull ( response ) |
autorisatieOngeldigStelselBrpDatumOvergangLeeg ( ) { toegangLeveringsAutorisatie . getLeveringsautorisatie ( ) . setStelsel ( Stelsel . BRP ) ; toegangLeveringsAutorisatie . getGeautoriseerde ( ) . getPartij ( ) . setDatumOvergangNaarBrp ( null ) ; final boolean isGeldig = service . isAutorisatieGeldig ( toegangLeverin... | org . junit . Assert . assertFalse ( isGeldig ) |
testRenameValues4FunctionsExceptGlobalMap ( ) { java . lang . String testString = "\"Hello<sp>\"<sp>+<sp>context.getProperty(\"World\")<sp>+<sp>property.get(\"World\")<sp>+<sp>globalMap.get(\"World\")<sp>+<sp>context.getProperty(\"World2\")<sp>+<sp>property.get(\"World2\")<sp>+<sp>globalMap.get(\"World2\")" ; java . la... | org . junit . Assert . assertTrue ( expectedValue . equals ( resultValue ) ) |
saveRetrySaved ( ) { com . psddev . dari . h2 . WriteModel model = new com . psddev . dari . h2 . WriteModel ( ) ; model . save ( ) ; com . psddev . dari . db . Query . from ( com . psddev . dari . h2 . WriteModel . class ) . deleteAll ( ) ; model . save ( ) ; "<AssertPlaceHolder>" ; } from ( java . lang . Class ) { re... | org . junit . Assert . assertThat ( com . psddev . dari . db . Query . from ( com . psddev . dari . h2 . WriteModel . class ) . first ( ) , is ( model ) ) |
shouldManageRecordWithNullMessage ( ) { java . util . logging . LogRecord record = fr . xephi . authme . output . ConsoleFilterTest . createRecord ( null ) ; boolean result = filter . isLoggable ( record ) ; "<AssertPlaceHolder>" ; verify ( record , never ( ) ) . setMessage ( "User<sp>issued<sp>an<sp>AuthMe<sp>command"... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( true ) ) |
testUndoTaskAssignmentByDocumentListAndUserId ( ) { java . util . List < qa . qcri . aidr . dbmanager . dto . DocumentDTO > documentDTOs = new java . util . ArrayList < qa . qcri . aidr . dbmanager . dto . DocumentDTO > ( ) ; documentDTOs . add ( qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestTaskAssi... | org . junit . Assert . assertEquals ( 1 , result ) |
testExplainTwice ( ) { com . splicemachine . derby . impl . sql . execute . operations . ResultSet rs = methodWatcher . executeQuery ( java . lang . String . format ( "--<sp>some<sp>comments<sp>\n<sp>explain\nupdate<sp>%s<sp>set<sp>i<sp>=<sp>0<sp>where<sp>i<sp>=<sp>1" , this . getTableReference ( com . splicemachine . ... | org . junit . Assert . assertTrue ( ( count1 == count2 ) ) |
uranus_should_have_quality_metrics ( ) { java . lang . String [ ] metrics = new java . lang . String [ ] { "coverage" , "ncloc" , "violations_density" , "it_coverage" } ; fr . norad . visuwall . api . domain . quality . QualityResult qualityResult = connection . analyzeQuality ( fr . norad . visuwall . plugin . demo . ... | org . junit . Assert . assertEquals ( coverageMeasure , qualityResult . getMeasure ( "coverage" ) ) |
CompareNumberOfDependenciesBetweenModules_Domain_Presentation ( ) { java . lang . String fromModule = "Domain" ; java . lang . String toModule = "Presentation" ; int numberOfDependencies = getNumberofDependenciesBetweenModulesInIntendedArchitecture ( fromModule , toModule ) ; "<AssertPlaceHolder>" ; } getNumberofDepend... | org . junit . Assert . assertTrue ( ( numberOfDependencies == 16 ) ) |
testRemoveRaster ( ) { axisMapping . addRasterName ( "algal" , "algal_1" ) ; axisMapping . addRasterName ( "algal" , "algal2" ) ; axisMapping . removeRasterName ( "algal" , "algal2" ) ; final java . util . List < java . lang . String > rasterNames = axisMapping . getRasterNames ( "algal" ) ; final java . util . List < ... | org . junit . Assert . assertEquals ( expectedRasterNames , rasterNames ) |
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . publicactivity . PublicActivity entity = new org . lnu . is . domain . publicactivity . PublicActivity ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Ob... | org . junit . Assert . assertEquals ( expected , actual ) |
testRendererWithFormatAndList ( ) { java . lang . String template = "The<sp>names:<sp><names;<sp>format=\"upper\">" ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . registerRenderer ( java . lang . String . class , new org . stringtemplate . v4 . StringRenderer ( ) ) ;... | org . junit . Assert . assertEquals ( expecting , result ) |
testAlert_ios ( ) { cn . jpush . api . push . model . notification . Notification notification = cn . jpush . api . push . model . notification . Notification . newBuilder ( ) . addPlatformNotification ( cn . jpush . api . push . model . notification . IosNotification . alert ( "alert" ) ) . build ( ) ; com . google . ... | org . junit . Assert . assertEquals ( "" , json , notification . toJSON ( ) ) |
testIsLogTableDefinedLogTableNotDefined ( ) { org . pentaho . di . core . database . DatabaseMeta databaseMeta = mock ( org . pentaho . di . core . database . DatabaseMeta . class ) ; doReturn ( databaseMeta ) . when ( transLogTable ) . getDatabaseMeta ( ) ; "<AssertPlaceHolder>" ; } isLogTableDefined ( org . pentaho .... | org . junit . Assert . assertFalse ( delegate . isLogTableDefined ( transLogTable ) ) |
linksInvalid ( ) { "<AssertPlaceHolder>" ; } links ( java . lang . String ) { java . util . ArrayList < java . lang . String > $ = new java . util . ArrayList ( ) ; if ( == null ) return $ ; = com . bugquery . stacktrace . Extract . trace ( ) ; for ( final com . bugquery . stacktrace . Matcher m = com . bugquery . stac... | org . junit . Assert . assertEquals ( com . bugquery . stacktrace . Extract . links ( null ) . size ( ) , 0 ) |
testSafety ( ) { try { org . krakenapps . cron . Schedule . Builder safe_builder = new org . krakenapps . cron . Schedule . Builder ( "daily" ) ; org . krakenapps . cron . Schedule safe_test = safe_builder . build ( ) ; System . out . println ( ( "safe_test1" + safe_test ) ) ; safe_builder . set ( CronField . Type . HO... | org . junit . Assert . assertEquals ( safe_test , new org . krakenapps . cron . Schedule . Builder ( "daily" ) . build ( ) ) |
testExecuteWithNullDisplay ( ) { org . eclipse . rap . rwt . internal . lifecycle . PhaseId nextPhase = render . execute ( null ) ; "<AssertPlaceHolder>" ; } execute ( org . eclipse . core . commands . ExecutionEvent ) { java . lang . String cheatSheetId = event . getParameter ( org . eclipse . ui . internal . cheatshe... | org . junit . Assert . assertNull ( nextPhase ) |
testMisconfiguredToolchain ( ) { org . apache . maven . execution . MavenSession session = mock ( org . apache . maven . execution . MavenSession . class ) ; org . apache . maven . execution . MavenExecutionRequest req = new org . apache . maven . execution . DefaultMavenExecutionRequest ( ) ; when ( session . getReque... | org . junit . Assert . assertEquals ( 0 , basics . length ) |
testNull ( ) { final java . lang . String [ ] res = org . eclipse . concierge . Utils . splitString ( null , ',' ) ; "<AssertPlaceHolder>" ; } splitString ( java . lang . String , char , int ) { if ( ( values == null ) || ( ( values . length ( ) ) == 0 ) ) { return org . eclipse . concierge . Utils . EMPTY_STRING_ARRAY... | org . junit . Assert . assertEquals ( res . length , 0 ) |
testConvert ( ) { java . lang . Long adminUnitId = 1L ; org . lnu . is . domain . admin . unit . AdminUnit adminUnit = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; adminUnit . setId ( adminUnitId ) ; java . lang . Long assetId = 2L ; org . lnu . is . domain . asset . Asset asset = new org . lnu . is . d... | org . junit . Assert . assertEquals ( expected , actual ) |
testIsConstraintValuePredicateWhenConstraintValueIsPredicate ( ) { when ( plugin . constraintValue ( ) ) . thenReturn ( BaseSingleFieldConstraint . TYPE_PREDICATE ) ; "<AssertPlaceHolder>" ; } isConstraintValuePredicate ( ) { return ( plugin ( ) . constraintValue ( ) ) == ( org . drools . workbench . models . datamodel... | org . junit . Assert . assertTrue ( page . isConstraintValuePredicate ( ) ) |
should_count_with_attributes ( ) { org . apache . deltaspike . data . test . domain . Simple simple = testData . createSimple ( "testFindAll1" , java . lang . Integer . valueOf ( 55 ) ) ; testData . createSimple ( "testFindAll2" , java . lang . Integer . valueOf ( 55 ) ) ; java . lang . Long result = repo . count ( sim... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , result ) |
canFormatListOfStrings ( ) { java . lang . String entity = json . assemble ( org . neo4j . server . rest . repr . ListRepresentation . strings ( "hello" , "world" ) ) ; java . lang . String expectedString = org . neo4j . server . rest . domain . JsonHelper . createJsonFrom ( java . util . Arrays . asList ( "hello" , "w... | org . junit . Assert . assertEquals ( expectedString , entity ) |
shouldReturnExpectedURLValidatorWhenDisabledSecureConnectionIsTrue ( ) { "<AssertPlaceHolder>" ; } urlValidatorValueOf ( boolean ) { return isDisabledSecureConnection ? uk . gov . pay . api . validation . URLValidator . SECURITY_DISABLED : uk . gov . pay . api . validation . URLValidator . SECURITY_ENABLED ; } | org . junit . Assert . assertThat ( uk . gov . pay . api . validation . URLValidator . urlValidatorValueOf ( true ) , org . hamcrest . core . Is . is ( uk . gov . pay . api . validation . URLValidator . SECURITY_DISABLED ) ) |
getAllObs_shouldGetBothChildAndParentObsAfterRemovingChildFromParentGrouping ( ) { org . openmrs . Encounter enc = new org . openmrs . Encounter ( ) ; org . openmrs . Obs parentObs = new org . openmrs . Obs ( ) ; enc . addObs ( parentObs ) ; org . openmrs . Obs childObs = new org . openmrs . Obs ( ) ; parentObs . addGr... | org . junit . Assert . assertEquals ( 2 , enc . getAllObs ( true ) . size ( ) ) |
evaluateHold ( ) { org . alfresco . service . cmr . repository . NodeRef nodeRef = generateNodeRef ( ) ; when ( mockedHoldService . isHold ( nodeRef ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; verify ( mockedHoldService , times ( 1 ) ) . isHold ( nodeRef ) ; verify ( mockedFreezeService , never ( ) ) . isFrozen... | org . junit . Assert . assertTrue ( condition . evaluate ( nodeRef ) ) |
testExportImportBoolean ( ) { java . lang . String booleanKey = "booleanKey" ; _dictionary . put ( booleanKey , true ) ; exportImportProperties ( _dictionary ) ; java . util . Dictionary dictionary = _configuration . getProperties ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return com . liferay . jou... | org . junit . Assert . assertTrue ( ( ( boolean ) ( dictionary . get ( booleanKey ) ) ) ) |
test_serialization ( ) { org . joda . money . CurrencyUnit cu = org . joda . money . CurrencyUnit . of ( "GBP" ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; try ( java . io . ObjectOutputStream oos = new java . io . ObjectOutputStream ( baos ) ) { oos . writeObject ( cu ) ; oo... | org . junit . Assert . assertEquals ( cu , input ) |
testDivide ( ) { java . math . BigDecimal valor1 = new java . math . BigDecimal ( "271.489" ) ; java . math . BigDecimal valor2 = new java . math . BigDecimal ( "7.33" ) ; java . math . BigDecimal expResult = new java . math . BigDecimal ( "37.03" ) ; java . math . BigDecimal result = com . chronos . calc . util . Bibl... | org . junit . Assert . assertEquals ( expResult , result ) |
test15 ( ) { long modulus = 17 ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 a = cc . redberry . rings . poly . univar . UnivariatePolynomialZ64 . create ( 0 , 6 , 2 , 1 , 10 , 15 , 16 , 15 , 2 , 11 , 13 , 0 , 1 , 15 , 5 , 13 , 8 , 14 , 13 , 14 , 15 , 1 , 1 ) . modulus ( modulus ) ; cc . redberry .... | org . junit . Assert . assertArrayEquals ( fast , plain ) |
shouldAnalyzeReturnsTrueForNonFileTypeAnalyzers ( ) { org . owasp . dependencycheck . AnalysisTask instance = new org . owasp . dependencycheck . AnalysisTask ( new org . owasp . dependencycheck . analyzer . HintAnalyzer ( ) , null , null , null ) ; boolean shouldAnalyze = instance . shouldAnalyze ( ) ; "<AssertPlaceHo... | org . junit . Assert . assertTrue ( shouldAnalyze ) |
shouldExportMatchNoneQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . MatchNoneQuery fts = com . couchbase . client . java . search . SearchQuery . matchNone ( ) . boost ( 1.5 ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchbase . client . java . search . ... | org . junit . Assert . assertEquals ( expected , query . export ( ) ) |
testSplitReverseZoneNames ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; registryDNS = new org . apache . hadoop . registry . server . dns . RegistryDNS ( "TestRegistry" ) ; conf . set ( RegistryConstants . KEY_DNS_DOMAIN , "example.com" ) ; conf . set (... | org . junit . Assert . assertEquals ( 4 , registryDNS . getZoneCount ( ) ) |
TestGetConfIncludeCommand ( ) { org . apache . hadoop . hdfs . HdfsConfiguration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; localFileSys = org . apache . hadoop . fs . FileSystem . getLocal ( conf ) ; org . apache . hadoop . fs . Path workingDir = localFileSys . getWorkingDirectory ( ) ; org . ap... | org . junit . Assert . assertEquals ( hostsFile . toUri ( ) . getPath ( ) , ret . trim ( ) ) |
uploadsFile ( ) { java . lang . String FILE_CONTENTS = "Uploaded<sp>file" ; java . io . File testFile = java . io . File . createTempFile ( "webdriver" , "tmp" ) ; testFile . deleteOnExit ( ) ; com . google . common . io . Files . write ( FILE_CONTENTS , testFile , Charsets . UTF_8 ) ; org . openqa . selenium . environ... | org . junit . Assert . assertEquals ( FILE_CONTENTS , body . getText ( ) ) |
testDoubleObj ( ) { java . lang . Class < com . j256 . ormlite . field . types . DoubleObjectTypeTest . LocalDoubleObj > clazz = com . j256 . ormlite . field . types . DoubleObjectTypeTest . LocalDoubleObj . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . DoubleObjectTypeTest . LocalDo... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testWithDuplicatesAndMinimimSet ( ) { java . util . Collection < org . apache . accumulo . core . security . Authorizations > toMinimize = com . google . common . collect . Lists . newArrayList ( new org . apache . accumulo . core . security . Authorizations ( "A" , "C" , "D" , "E" , "F" ) , new org . apache . accumulo... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldRejectWhenTicketIsEmpty ( ) { suspension . getTicket ( ) . setTicketId ( "" ) ; suspension . getTicket ( ) . setComment ( "" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = lbsvalidator . validate ( suspension , org . openstack . atlas . api . mgmt . validation . validators . P... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) ) |
testConstructorWithConfigurationAndNullCapabilities ( ) { org . openqa . grid . internal . utils . configuration . GridNodeConfiguration config = new org . openqa . grid . internal . utils . configuration . GridNodeConfiguration ( ) ; config . capabilities = null ; org . openqa . grid . common . RegistrationRequest req... | org . junit . Assert . assertNull ( req . getConfiguration ( ) . capabilities ) |
testReadAndWriteLargeString ( ) { org . gradoop . common . model . impl . properties . PropertyValue p = org . gradoop . common . model . impl . properties . PropertyValue . create ( new java . lang . String ( new byte [ PropertyValue . LARGE_PROPERTY_THRESHOLD ] ) ) ; "<AssertPlaceHolder>" ; } writeAndReadFields ( jav... | org . junit . Assert . assertEquals ( p , writeAndReadFields ( org . gradoop . common . model . impl . properties . PropertyValue . class , p ) ) |
testParallelMapWith3Versus2Elements ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "names,phones" , "hi<sp><names,phones:{n,p<sp>|<sp><n>:<p>;}>" ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "name... | org . junit . Assert . assertEquals ( expected , result ) |
subscribeForAnNotAuthenticatedUser ( ) { com . sun . jersey . api . client . WebResource resource = resource ( ) ; try { java . lang . String result = resource . path ( org . silverpeas . core . subscription . web . SubscriptionTestResources . UNSUBSCRIBE_RESOURCE_PATH ) . accept ( MediaType . APPLICATION_JSON ) . post... | org . junit . Assert . assertThat ( recievedStatus , org . hamcrest . Matchers . is ( unauthorized ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.