input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
refinementWithConjunctionAndDisjunction ( ) { generateDrugHierarchy ( ) ; generateTisselKit ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:%s=%s<sp>OR<sp>(%s=%s<sp>AND<sp>%s=%s)" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvalu... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreate ( ) { org . oscarehr . common . model . HL7HandlerMSHMapping entity = new org . oscarehr . common . model . HL7HandlerMSHMapping ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { retu... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
generateSessionIdIfLengthIsPositive ( ) { when ( propertyChain . getProperty ( ( ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . TRACEE_DEFAULT_PROFILE_PREFIX ) + ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . GENERATE_SESSION_ID ) ) ) ) . thenReturn ( "1" ) ; "<As... | org . junit . Assert . assertThat ( unit . shouldGenerateSessionId ( ) , org . hamcrest . Matchers . is ( true ) ) |
testLength ( ) { final com . salesforce . zsync . internal . util . RollingBuffer b = new com . salesforce . zsync . internal . util . RollingBuffer ( newChannel ( new java . io . ByteArrayInputStream ( new byte [ 2 ] ) ) , 1 , 2 ) ; "<AssertPlaceHolder>" ; } length ( ) { return ( ( this . last ) - ( this . first ) ) +... | org . junit . Assert . assertEquals ( 1 , b . length ( ) ) |
shouldEvaluateFlipConditionToFalseGivenFlipConditionIsDefinedWithConditionEvaluatingToFalse ( ) { org . springframework . context . ApplicationContext applicationContext = mock ( org . springframework . context . ApplicationContext . class ) ; org . flips . model . FeatureContext featureContext = mock ( org . flips . m... | org . junit . Assert . assertEquals ( false , result ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . knowledge . base . model . KBComment newKBComment = addKBComment ( ) ; com . liferay . knowledge . base . model . KBComment existingKBComment = _persistence . fetchByPrimaryKey ( newKBComment . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return... | org . junit . Assert . assertEquals ( existingKBComment , newKBComment ) |
testCacheByPage ( ) { long begin = java . lang . System . currentTimeMillis ( ) ; java . util . List < com . xiaolyuh . domain . model . Person > persons = personService . findAll ( ) ; long ing = java . lang . System . currentTimeMillis ( ) ; personService . findAll ( ) ; long end = java . lang . System . currentTimeM... | org . junit . Assert . assertNotNull ( persons ) |
getRequestIdGets ( ) { final byte [ ] actualData = new byte [ ] { } ; com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage msg = new com . microsoft . azure . sdk . iot . device . transport . IotHubTransportMessage ( actualData , com . microsoft . azure . sdk . iot . device . MessageType . ... | org . junit . Assert . assertEquals ( requestId , "12" ) |
retrieve ( ) { org . jdom2 . Document xml1 = new org . jdom2 . Document ( new org . jdom2 . Element ( "root" ) ) ; int id = getMetaDataStore ( ) . create ( new org . mycore . common . content . MCRJDOMContent ( xml1 ) ) . getID ( ) ; org . mycore . datamodel . ifs2 . MCRStoredMetadata sm1 = getMetaDataStore ( ) . retri... | org . junit . Assert . assertEquals ( new org . mycore . common . content . MCRJDOMContent ( xml1 ) . asString ( ) , xml2 . asString ( ) ) |
testSetProperty_invalidValue ( ) { org . kuali . rice . core . impl . services . ConfigurationServiceImpl . PropertyHolder propertyHolder = new org . kuali . rice . core . impl . services . ConfigurationServiceImpl . PropertyHolder ( ) ; boolean failedAsExpected = false ; try { propertyHolder . setProperty ( org . kual... | org . junit . Assert . assertTrue ( failedAsExpected ) |
testExchangePartitionCustomTableAndPartLocation ( ) { org . apache . hadoop . hive . metastore . api . Table source = createTable ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . DB_NAME , "/2019j23" 1 , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . getYearMo... | org . junit . Assert . assertTrue ( destTablePartitions . isEmpty ( ) ) |
testVisitInsnWithProbe ( ) { instrumenter . visitInsnWithProbe ( Opcodes . RETURN , 3 ) ; expectedVisitor . visitLdcInsn ( "Probe<sp>3" ) ; expectedVisitor . visitInsn ( Opcodes . RETURN ) ; "<AssertPlaceHolder>" ; } visitInsn ( int ) { switch ( opcode ) { case org . objectweb . asm . Opcodes . RET : throw new java . l... | org . junit . Assert . assertEquals ( expected , actual ) |
testAvroBasedWritablePipeline ( ) { java . lang . String customersInputPath = tmpDir . copyResourceFileName ( "customers.txt" ) ; org . apache . crunch . Pipeline pipeline = new org . apache . crunch . impl . mr . MRPipeline ( org . apache . crunch . io . avro . AvroWritableIT . class , tmpDir . getDefaultConfiguration... | org . junit . Assert . assertEquals ( expectedMap , outputMap ) |
testFilterModification ( ) { org . opengis . filter . Filter filterIn = ddf . catalog . filter . delegate . CopyFilterDelegateTest . FF . equals ( ddf . catalog . filter . delegate . CopyFilterDelegateTest . TEST_PROPERTY , ddf . catalog . filter . delegate . CopyFilterDelegateTest . FOO_LITERAL ) ; ddf . catalog . fil... | org . junit . Assert . assertTrue ( modifiedFilter . evaluate ( feature ) ) |
testNullConstructor ( ) { try { new com . twelvemonkeys . io . StringArrayReader ( null ) ; org . junit . Assert . fail ( "Should<sp>not<sp>allow<sp>null<sp>argument" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertNotNull ( e . getMessage ( ) ) |
signedByDifferentKeyWithSlop ( ) { org . eclipse . jgit . transport . HMACSHA1NonceGenerator other = new org . eclipse . jgit . transport . HMACSHA1NonceGenerator ( "other" ) ; java . lang . String sent = gen . createNonce ( db , ( ( org . eclipse . jgit . transport . HMACSHA1NonceGeneratorTest . TS ) - 10 ) ) ; java .... | org . junit . Assert . assertEquals ( NonceStatus . BAD , gen . verify ( received , sent , db , true , 100 ) ) |
defaultPathIsEmpty ( ) { de . taimos . pipeline . aws . S3FindFilesStep step = new de . taimos . pipeline . aws . S3FindFilesStep ( "my-bucket" , false , false ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return this . path ; } | org . junit . Assert . assertEquals ( "" , step . getPath ( ) ) |
testResolveRoutingKeyCommunicationWithChargingStationEvent ( ) { org . axonframework . domain . EventMessage message = new org . axonframework . domain . GenericEventMessage ( new io . motown . domain . api . chargingstation . HardResetChargingStationRequestedEvent ( CHARGING_STATION_ID , PROTOCOL , ROOT_IDENTITY_CONTE... | org . junit . Assert . assertEquals ( expected , routingKey ) |
testChartLocationsDialog ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testChartCallback" ) ; org . eclipse . linuxtools . internal . valgrind . massif . MassifViewPart view = ( ( org . eclipse . linuxtools . internal . valgrind .... | org . junit . Assert . assertTrue ( snapshot . isDetailed ( ) ) |
testGetSettings ( ) { org . apache . maven . settings . Settings settings = org . rioproject . resolver . aether . util . SettingsUtil . getSettings ( ) ; "<AssertPlaceHolder>" ; } getSettings ( ) { org . apache . maven . settings . building . DefaultSettingsBuilder defaultSettingsBuilder = new org . apache . maven . s... | org . junit . Assert . assertNotNull ( settings ) |
getResourceAsStream_A$String ( ) { org . junithelper . core . file . FileReaderCommonsIOImpl target = new org . junithelper . core . file . FileReaderCommonsIOImpl ( ) ; java . lang . String name = "junithelper-config.properties" ; java . io . InputStream actual = target . getResourceAsStream ( name ) ; "<AssertPlaceHo... | org . junit . Assert . assertNotNull ( actual ) |
testUnmarshalling ( ) { java . io . InputStream is = au . edu . federation . utils . MarshallingUtilTest . class . getResourceAsStream ( "/sampleMarshalledChain.xml" ) ; au . edu . federation . caliko . FabrikChain3D unmarhsalledChain = au . edu . federation . utils . MarshallingUtil . unmarshallChain ( is , au . edu .... | org . junit . Assert . assertNotNull ( unmarhsalledChain ) |
testSchedule_withSetTolerance ( ) { final com . twitter . whiskey . nio . RunLoopTest . Counter events = new com . twitter . whiskey . nio . RunLoopTest . Counter ( ) ; runLoop . schedule ( new java . lang . Runnable ( ) { @ com . twitter . whiskey . nio . Override public void run ( ) { ( events . count ) ++ ; } } , 10... | org . junit . Assert . assertEquals ( 1 , events . count ) |
skipStreamThenAcceptWithCommentsOk ( ) { java . lang . String script = "#Stream<sp>#1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "connect<sp>\'tcp://localhost:8080\'\n" + "#Middle<sp>Comment\n" 4 ) + "#Middle<sp>Comment\n" ) + "close\n" ) + "closed\n" ) + "#Middle<sp>Comment\n" 3 ) + "connect<sp>\'tcp://localhost:808... | org . junit . Assert . assertEquals ( expectedScript , observedScript ) |
testGetMinOrder ( ) { java . math . BigInteger expResult = java . math . BigInteger . valueOf ( 2 ) ; java . math . BigInteger result = ch . bfh . unicrypt . math . algebra . general . classes . BooleanSet . getInstance ( ) . getOrderLowerBound ( ) ; "<AssertPlaceHolder>" ; } getOrderLowerBound ( ) { if ( ( this . lowe... | org . junit . Assert . assertEquals ( expResult , result ) |
testEnterAndExit ( ) { turin . context . ContextTest . MyContext ctx = new turin . context . ContextTest . MyContext ( ) ; ctx . enterContext ( "foo" ) ; ctx . exitContext ( ) ; "<AssertPlaceHolder>" ; } get ( ) { java . util . Stack < V > ctx = values . get ( ) ; if ( ctx . isEmpty ( ) ) { return java . util . Optiona... | org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , ctx . get ( ) ) |
testGetHeight ( ) { System . out . println ( "getHeight" ) ; final int imageWidth = 150 ; final int imageHeight = 50 ; java . awt . image . BufferedImage image = new java . awt . image . BufferedImage ( imageWidth , imageHeight , java . awt . image . BufferedImage . TYPE_INT_ARGB ) ; java . awt . Graphics g = image . g... | org . junit . Assert . assertEquals ( expResult , result ) |
shouldRejectConnectionPutwithOutRegEx ( ) { hm = org . openstack . atlas . api . validation . validators . HealthMonitorValidatorTest . whenValidatingPut . initHealthMonitor ( null , org . openstack . atlas . api . validation . validators . CONNECT , "10" , "20" , "10" , "/mnt/pfft" , null , null ) ; result = hmv . val... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . validation . validators . PUT ) , result . passedValidation ( ) ) |
testGetServiceWithGeoServerRef ( ) { org . geoserver . wms . WMSInfo service = new org . geoserver . wms . WMSInfoImpl ( ) ; ( ( org . geoserver . wms . WMSInfoImpl ) ( service ) ) . setId ( "WMS-TEST" ) ; service . setName ( "WMS" ) ; service . setMaintainer ( "Foo" ) ; service = database . add ( service ) ; database ... | org . junit . Assert . assertNotNull ( service . getGeoServer ( ) ) |
testAndMultiPath ( ) { java . util . List < java . lang . String > expected = java . util . Collections . emptyList ( ) ; org . eclipse . jgit . treewalk . filter . TreeFilter [ ] tf = new org . eclipse . jgit . treewalk . filter . TreeFilter [ ] { org . eclipse . jgit . treewalk . filter . PathFilter . create ( "sub1"... | org . junit . Assert . assertEquals ( expected , paths ) |
should_not_collapse_non_overlapping_end_paths ( ) { int k = 4 ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > ( ) ; input . add ( KPN ( k , "GTAC" , 1 , 2 , false ) ) ; input . ad... | org . junit . Assert . assertEquals ( splitExpected , splitActual ) |
testAsyncBulkWritePartialFailureBufferFailure ( ) { java . lang . String name = "distrlog-testAsyncBulkWritePartialFailure" ; org . apache . distributedlog . DistributedLogConfiguration confLocal = new org . apache . distributedlog . DistributedLogConfiguration ( ) ; confLocal . loadConf ( testConf ) ; confLocal . setO... | org . junit . Assert . assertEquals ( ( ( 2 * goodRecs ) + 1 ) , results . size ( ) ) |
shouldNotFindNodeWithRemovedLabelInPrefixSearch ( ) { boolean needsValues = indexProvidesStringValues ( ) ; int label = token . nodeLabel ( "Node" ) ; int prop = token . propertyKey ( "prop" ) ; org . neo4j . internal . kernel . api . IndexReference index = schemaRead . index ( label , prop ) ; try ( org . neo4j . grap... | org . junit . Assert . assertFalse ( node . next ( ) ) |
testBuildWithOrderBy ( ) { org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType context = new org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pa... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testFourWeekRobustFitOutliers ( ) { double [ ] data = com . github . servicenow . ds . stats . stl . SimulatedWeeklyMetric . getFourWeekValues ( ) ; assert ( data . length ) == 4032 ; int periodicity = 1008 ; com . github . servicenow . ds . stats . stl . SeasonalTrendLoess . Builder builder = new com . github . servic... | org . junit . Assert . assertEquals ( 0 , allZeroWeightCount ) |
deveObterInfoCancelamentoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento cancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento ( ) ; final com . fincatto . documentofiscal . nfe... | org . junit . Assert . assertEquals ( infoCancelamento , cancelamento . getInfoCancelamento ( ) ) |
testBuildWithDisabledSecurityConstraitnsWithOrderBy ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit context = new org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGet ( ) { org . netbeans . modules . editor . lib2 . actions . MacroRecording macroRecording = org . netbeans . modules . editor . lib2 . actions . MacroRecording . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . netbeans . modules . editor . lib2 . actions . MacroRecording . INSTANCE ; } | org . junit . Assert . assertNotNull ( macroRecording ) |
equalsContractHashCode ( ) { final org . jboss . aerogear . simplepush . server . datastore . model . AckDTO x = new org . jboss . aerogear . simplepush . server . datastore . model . AckDTO ( new org . jboss . aerogear . simplepush . server . datastore . model . UserAgentDTO ( uaid ) , channelId , version ) ; final or... | org . junit . Assert . assertThat ( x . hashCode ( ) , org . hamcrest . CoreMatchers . is ( y . hashCode ( ) ) ) |
testResponseConnControlNoEntity ( ) { final org . apache . hc . core5 . http . protocol . HttpContext context = new org . apache . hc . core5 . http . protocol . BasicHttpContext ( null ) ; final org . apache . hc . core5 . http . ClassicHttpResponse response = new org . apache . hc . core5 . http . message . BasicClas... | org . junit . Assert . assertNull ( header ) |
testXSMTPHEADER ( ) { java . util . List < com . aliyuncs . dm . simple . Email . Address > cc = new java . util . ArrayList < com . aliyuncs . dm . simple . Email . Address > ( ) ; cc . add ( new com . aliyuncs . dm . simple . Email . Address ( properties . getProperty ( "test.to.address" ) , "cc" ) ) ; com . aliyuncs... | org . junit . Assert . assertEquals ( "hello" 0 , result ) |
testMinimum ( ) { double finalScore = executeAndFetchScore ( "scorecards_min" ) ; "<AssertPlaceHolder>" ; } executeAndFetchScore ( java . lang . String ) { org . kie . api . io . Resource resource = org . kie . internal . io . ResourceFactory . newClassPathResource ( "scoremodel_scoring_strategies.xls" ) . setResourceT... | org . junit . Assert . assertEquals ( ( - 1.0 ) , finalScore , 0.0 ) |
testGetParametersWithDefaultEntityAndDisabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . degree . type . DegreeType entity = new org . lnu . is . domain . degree . type . DegreeType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < jav... | org . junit . Assert . assertEquals ( expected , actual ) |
clear_by_int_range ( ) { int maxId = dao . getMaxId ( org . nutz . dao . test . meta . Pet . class ) ; int num = dao . clear ( org . nutz . dao . test . meta . Pet . class , org . nutz . dao . Cnd . where ( "id" , "IN" , new int [ ] { maxId , maxId - 1 } ) ) ; "<AssertPlaceHolder>" ; } getMaxId ( java . lang . Class ) ... | org . junit . Assert . assertEquals ( 2 , num ) |
hasCurrentUserSubscriptions_SubscriptionManger_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "hasCurrentUserSubscriptions" ) ; boolean isSubscriptionManagerRoleAllowed = isRoleAllowed ( method , UserRoleType . SUBSCRIPTION_MANAGER ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . l... | org . junit . Assert . assertTrue ( isSubscriptionManagerRoleAllowed ) |
hasPermissionToTemplateModifyWhenUserIsShakedownAdminAndIsTestingMode ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceEntity as = resourceEntityBuilder . mockAppServerEntity ( "as" , null , null , null ) ; when ( sessionContext . isCallerInRole ( ch . puzzle . itc . mobiliar . business . se... | org . junit . Assert . assertTrue ( result ) |
badValueOfReturnType ( ) { com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver . Thing thing = new com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . BadValueOfTypeHaver . Thing ( ) ; java . util . ResourceBundle bundle = bun... | org . junit . Assert . assertSame ( thing , bound . thing ( ) ) |
localName_contextItem_empty ( ) { final org . xmldb . api . base . ResourceSet result = org . exist . xquery . XQueryFunctionsTest . existEmbeddedServer . executeQuery ( ( "let<sp>$a<sp>:=<sp><a><b/></a>" + "return<sp>$a/b/c/fn:local-name()" ) ) ; final java . lang . String r = ( ( java . lang . String ) ( result . get... | org . junit . Assert . assertEquals ( "" , r ) |
toPrimitiveByteForNumber ( ) { java . lang . Integer i = java . lang . Integer . valueOf ( 1 ) ; "<AssertPlaceHolder>" ; } toPrimitiveByte ( java . lang . Object ) { java . lang . Byte b = org . slim3 . util . ByteUtil . toByte ( o ) ; if ( b == null ) { return 0 ; } return b . byteValue ( ) ; } | org . junit . Assert . assertThat ( org . slim3 . util . ByteUtil . toPrimitiveByte ( i ) , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 1 ) ) ) ) |
_ ( ) { java . lang . String targetFileName = java . lang . String . format ( "adsWriteFailure_%s.log.%d" , "000" , 1234567890L ) ; "<AssertPlaceHolder>" ; } checkAcceptResult ( java . lang . String ) { java . io . File file = new java . io . File ( targetFileName ) ; file . deleteOnExit ( ) ; try { file . createNewFil... | org . junit . Assert . assertFalse ( checkAcceptResult ( targetFileName ) ) |
testFunction2 ( ) { net . objecthunter . exp4j . function . Function custom = new net . objecthunter . exp4j . function . Function ( "loglog" ) { @ net . objecthunter . exp4j . Override public double apply ( double ... values ) { return java . lang . Math . Math . log ( java . lang . Math . Math . log ( values [ 0 ] ) ... | org . junit . Assert . assertTrue ( ( result == ( java . lang . Math . Math . log ( java . lang . Math . Math . log ( 1 ) ) ) ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . tools . service . builder . test . model . LVEntryVersion . class , _dynamicQueryClassLoader ) ;... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
whenCreatingAdvanceDockerClient_thenReturnInstance ( ) { com . github . dockerjava . core . DefaultDockerClientConfig config = com . github . dockerjava . core . DefaultDockerClientConfig . createDefaultConfigBuilder ( ) . withRegistryEmail ( "info@bealdung.com" ) . withRegistryUrl ( "register.bealdung.io/v2/" ) . with... | org . junit . Assert . assertNotNull ( dockerClient ) |
testCompileVideo ( ) { com . bixly . pastevid . recorders . RecorderTest . log ( "compileVideo" ) ; com . bixly . pastevid . recorders . Recorder instance = new com . bixly . pastevid . recorders . Recorder ( new com . bixly . pastevid . recorders . RecorderTest . TestMeasurable ( ) ) ; instance . cleanAndCreateFiles (... | org . junit . Assert . assertEquals ( expResult , result ) |
read ( ) { com . asakusafw . runtime . io . json . value . ByteOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . value . ByteOption option = new com . asakusafw . runtime . value . ByteOption ( ) ; adapter . read ( new com . asakusafw . runtime . io . json . value . MockValue ( 100 ) , o... | org . junit . Assert . assertThat ( option , is ( new com . asakusafw . runtime . value . ByteOption ( ( ( byte ) ( 100 ) ) ) ) ) |
testLoopingParserIteration ( ) { org . petitparser . parser . combinators . SettableParser parser1 = undefined ( ) ; org . petitparser . parser . combinators . SettableParser parser2 = undefined ( ) ; org . petitparser . parser . combinators . SettableParser parser3 = undefined ( ) ; parser1 . set ( parser2 ) ; parser2... | org . junit . Assert . assertEquals ( java . util . Arrays . < org . petitparser . parser . Parser > asList ( parser1 , parser2 , parser3 ) , parsers ) |
testConvertToDatumDouble ( ) { double expected = 1234.5678 ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . Object > converter = org . talend . codegen . converter . IdentityConverter . getInstance ( ) ; double actual = ( ( java . lang . Double ) ( converter . convertToD... | org . junit . Assert . assertEquals ( expected , actual , 0 ) |
testSetCallerMethodName ( ) { final org . bonitasoft . engine . queriablelogger . model . builder . SQueriableLogBuilder builder = fact . createNewInstance ( ) ; builder . callerMethodName ( "insertRecord" ) . rawMessage ( "successfully<sp>executed" ) . severity ( SQueriableLogSeverity . BUSINESS ) ; builder . actionTy... | org . junit . Assert . assertEquals ( "insertRecord" , queriableLog . getCallerMethodName ( ) ) |
messageModifiedByNextProcessorIsPropagated ( ) { org . mule . runtime . core . api . event . CoreEvent modifiedMessageEvent = org . mule . runtime . core . api . event . CoreEvent . builder ( initialEvent ) . message ( org . mule . runtime . core . internal . policy . AbstractPolicyProcessorTestCase . MESSAGE ) . build... | org . junit . Assert . assertEquals ( resultEvent . getMessage ( ) , org . mule . runtime . core . internal . policy . AbstractPolicyProcessorTestCase . MESSAGE ) |
testSerializationEmpty ( ) { final com . logsniffer . fields . FieldsMap map = new com . logsniffer . fields . FieldsMap ( ) ; final java . lang . String jsonStr = mapper . writeValueAsString ( map ) ; LOGGER . info ( "Serialized<sp>{}<sp>to:<sp>{}" , map , jsonStr ) ; final net . sf . json . JSONObject parsedJson = ne... | org . junit . Assert . assertTrue ( parsedJson . isEmpty ( ) ) |
testWrite ( ) { org . apache . poi . hslf . record . SlideAtom sa = new org . apache . poi . hslf . record . SlideAtom ( org . apache . poi . hslf . record . TestSlideAtom . data_a , 0 , org . apache . poi . hslf . record . TestSlideAtom . data_a . length ) ; java . io . ByteArrayOutputStream baos = new java . io . Byt... | org . junit . Assert . assertArrayEquals ( org . apache . poi . hslf . record . TestSlideAtom . data_a , baos . toByteArray ( ) ) |
deveObterProtocoloCancelamentoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . consulta . NFNotaConsultaRetorno consultaRetorno = new com . fincatto . documentofiscal . nfe310 . classes . nota . consulta . NFNotaConsultaRetorno ( ) ; final com . fincatto . documentofiscal . nfe310 ... | org . junit . Assert . assertEquals ( protocoloCancelamento , consultaRetorno . getProtocoloCancelamento ( ) ) |
testListAllConnections ( ) { com . streamreduce . core . model . Account nAccount = testUser . getAccount ( ) ; java . util . List < com . streamreduce . core . model . Connection > nConnections = connectionService . getConnections ( null , testUser ) ; for ( com . streamreduce . core . model . Connection connection : ... | org . junit . Assert . assertTrue ( connection . getAccount ( ) . getId ( ) . equals ( nAccount . getId ( ) ) ) |
setTransitVlanId ( ) { flow . setTransitVlanId ( org . openkilda . messaging . command . Constants . transitVlanId ) ; "<AssertPlaceHolder>" ; } getTransitVlanId ( ) { org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . transitVlanId , flow . getTransitVlanId ( ) . intValue ( ) ) ;... | org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . transitVlanId , flow . getTransitVlanId ( ) . intValue ( ) ) |
testGetWhiteListMissingDir ( ) { java . io . File dir = new java . io . File ( "target" , java . util . UUID . randomUUID ( ) . toString ( ) ) . getAbsoluteFile ( ) ; "<AssertPlaceHolder>" ; } getWhiteList ( java . lang . String , java . lang . String ) { java . util . Set < java . lang . String > set = null ; java . i... | org . junit . Assert . assertNull ( com . streamsets . pipeline . BootstrapMain . getWhiteList ( dir . getAbsolutePath ( ) , null ) ) |
Select_with_Resource_Binding_no_Match ( ) { com . mysema . rdfbean . model . SPARQLQuery query = connection . createQuery ( QueryLanguage . SPARQL , com . mysema . rdfbean . jena . SPARQLQueryTest . SELECT_LIMIT_10 ) ; query . setBinding ( "p" , new com . mysema . rdfbean . model . UID ( com . mysema . rdfbean . TEST .... | org . junit . Assert . assertFalse ( rows . hasNext ( ) ) |
testInitDynAnyFromAny ( ) { java . lang . String msg ; org . jacorb . test . NonEmptyException type ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynStruct dynAny = null ; org . omg . DynamicAny . DynStruct dynAny2 = null ; tc = org . jacorb . test . NonEmptyEx... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
fieldAccess ( ) { final org . apache . johnzon . mapper . MapperTest . FieldAccess value = new org . apache . johnzon . mapper . MapperBuilder ( ) . setAccessModeName ( "field" ) . build ( ) . readObject ( new java . io . ByteArrayInputStream ( "{\"value\":1}" . getBytes ( ) ) , org . apache . johnzon . mapper . Mapper... | org . junit . Assert . assertEquals ( 1 , value . value ) |
createPrimeFaces ( ) { wizardAction . openNewLiferayJsfProjectWizard ( ) ; wizardAction . newLiferayJsf . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . jsf . tests . PRIMEFACES ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningProjectBuildingJobs ( ) ; "<AssertPlaceHolder>" ; viewAction . ... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
test12 ( ) { java . lang . String sql = "set<sp>TRANSACTION<sp>ISOLATION<sp>LEVEL<sp>SERIALIZABLE" ; com . alibaba . druid . sql . parser . SQLStatementParser parser = new com . alibaba . druid . sql . dialect . mysql . parser . MySqlStatementParser ( sql ) ; java . util . List < com . alibaba . druid . sql . ast . SQL... | org . junit . Assert . assertTrue ( ( ( x . getSession ( ) ) == null ) ) |
testCommit ( ) { org . gitlab4j . api . models . Commit commit = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . Commit . class , "commit.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . InputStre... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( commit , "commit.json" ) ) |
testAndMultiSubPath ( ) { java . util . List < java . lang . String > expected = java . util . Collections . emptyList ( ) ; org . eclipse . jgit . treewalk . filter . TreeFilter [ ] tf = new org . eclipse . jgit . treewalk . filter . TreeFilter [ ] { org . eclipse . jgit . treewalk . filter . PathFilter . create ( "su... | org . junit . Assert . assertEquals ( expected , paths ) |
testHasScope_1 ( ) { org . jinstagram . auth . model . OAuthConfig fixture = new org . jinstagram . auth . model . OAuthConfig ( "key" , "secret" , "callback" , "scope" , "display" ) ; fixture . setRequestProxy ( org . jinstagram . auth . model . OAuthConfigTest . proxy ) ; boolean result = fixture . hasScope ( ) ; "<A... | org . junit . Assert . assertTrue ( result ) |
isTypeOf_fail ( ) { "<AssertPlaceHolder>" ; javax . lang . model . type . TypeMirror method = getOnlyElement ( typeElementFor ( com . google . auto . common . MoreTypesIsTypeOfTest . DeclaredVoid . class ) . getEnclosedElements ( ) ) . asType ( ) ; try { com . google . auto . common . MoreTypes . isTypeOf ( java . lang... | org . junit . Assert . assertFalse ( com . google . auto . common . MoreTypes . isType ( getOnlyElement ( typeElementFor ( com . google . auto . common . MoreTypesIsTypeOfTest . DeclaredVoid . class ) . getEnclosedElements ( ) ) . asType ( ) ) ) |
testGetConnectionSourceTablePrefersNullSourceIfArgNull ( ) { java . util . List < java . io . Closeable > toClose = new java . util . ArrayList ( ) ; com . pentaho . big . data . bundles . impl . shim . hbase . connectionPool . HBaseConnectionHandle connectionHandle = hBaseConnectionPool . getConnectionHandle ( ) ; com... | org . junit . Assert . assertEquals ( connection , hBaseConnectionPool . getConnectionHandle ( null ) . getConnection ( ) ) |
testSerialization ( ) { org . jfree . chart . renderer . category . LineAndShapeRenderer r1 = new org . jfree . chart . renderer . category . LineAndShapeRenderer ( ) ; org . jfree . chart . renderer . category . LineAndShapeRenderer r2 = ( ( org . jfree . chart . renderer . category . LineAndShapeRenderer ) ( org . jf... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testHasBodyOnNewMessage ( ) { org . apache . qpid . jms . provider . amqp . message . AmqpJmsBytesMessageFacade amqpBytesMessageFacade = createNewBytesMessageFacade ( ) ; "<AssertPlaceHolder>" ; } hasBody ( ) { try { return ( getText ( ) ) != null ; } catch ( java . lang . Exception e ) { return false ; } } | org . junit . Assert . assertFalse ( amqpBytesMessageFacade . hasBody ( ) ) |
testFixedSizeChar ( ) { org . apache . tajo . catalog . Schema schema = org . apache . tajo . catalog . SchemaBuilder . builder ( ) . add ( "col1" , org . apache . tajo . catalog . CatalogUtil . newDataTypeWithLen ( Type . CHAR , 5 ) ) . build ( ) ; org . apache . tajo . engine . util . Tuple tuple = new org . apache .... | org . junit . Assert . assertEquals ( tuple , tuple2 ) |
testGetAvailableSignalsAbortedProcess ( ) { long processInstanceId = processService . startProcess ( deploymentUnit . getIdentifier ( ) , org . jbpm . kie . services . test . ProcessServiceImplPerProcessInstanceTest . PROCESS_ID_SIGNAL ) ; "<AssertPlaceHolder>" ; processService . abortProcessInstance ( processInstanceI... | org . junit . Assert . assertNotNull ( processInstanceId ) |
testRandomNBit ( ) { for ( int bits = 1 ; bits <= 32 ; bits ++ ) { byte [ ] data = org . jcodec . common . io . BitStreamTest . randomData ( ( bits * 10000 ) ) ; org . jcodec . common . io . BitReader in1 = reader ( data ) ; org . jcodec . common . io . DummyBitstreamReader in2 = new org . jcodec . common . io . DummyB... | org . junit . Assert . assertEquals ( exp , exp1 ) |
equalsDiffStackTest ( ) { java . lang . StackTraceElement [ ] stack1 = java . lang . Thread . currentThread ( ) . getStackTrace ( ) ; org . threadly . util . debug . Profiler . Trace t1 = new org . threadly . util . debug . Profiler . Trace ( stack1 ) ; java . lang . StackTraceElement [ ] stack2 = new java . lang . Sta... | org . junit . Assert . assertFalse ( t1 . equals ( t2 ) ) |
testOk ( ) { new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( true ) ; "<AssertPlaceHolder>" ; } setup ( boolean ) { org . mockito . Mockito . when ( plControleBevatDatumIngangBlokkering . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . sync... | org . junit . Assert . assertTrue ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) ) |
should_check_if_a_project_exists ( ) { org . kohsuke . github . GHRepository ghRepository = mock ( org . kohsuke . github . GHRepository . class ) ; org . kohsuke . github . GHUser ghUser = mock ( org . kohsuke . github . GHUser . class ) ; when ( ghUser . getLogin ( ) ) . thenReturn ( "test_user" ) ; when ( ghReposito... | org . junit . Assert . assertTrue ( repo . projectExists ( ghRepository ) ) |
testSingleCacheCheckpointNode ( ) { await ( repository . pushAndUpdateHeads ( commits ( asLong ( ( g ) -> { g . add ( 1 , 2 , add ( 1 ) ) ; g . add ( 2 , 3 , add ( 1 ) ) ; g . add ( 3 , 4 , add ( 1 ) ) ; g . add ( 4 , 5 , add ( 1 ) ) ; g . add ( 5 , 6 , add ( 1 ) ) ; g . add ( 5 , 7 , add ( 1 ) ) ; } ) ) ) ) ; await ( ... | org . junit . Assert . assertEquals ( 5 , result ) |
testSetting_CommonSourceDateFormat ( ) { java . lang . String actualCommand = com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . getBaseTdchBuilder ( ) . setCommonSourceDateFormat ( "yyyy-MM-dd" ) . build ( ) ; java . lang . String expectedCommand = ( ( ( ( ( com . th... | org . junit . Assert . assertEquals ( expectedCommand , actualCommand ) |
AccessInstanceVariableConstant ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AccessInstanceVariableConstant" ; java . lang . String toClass = "Technology.Direct.Dao.UserDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; type... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
changeConfigurationRejectedVerifyReturnValue ( ) { when ( chargePointService . changeConfiguration ( any ( io . motown . ocpp . v12 . soap . chargepoint . ChangeConfigurationRequest . class ) , eq ( io . motown . ocpp . v12 . soap . chargepoint . CHARGING_STATION_ID . getId ( ) ) ) ) . thenReturn ( getChangeConfigurati... | org . junit . Assert . assertFalse ( hasConfigurationChanged ) |
testStatusFilter ( ) { ru . codeinside . gws . api . impl . FileClientLog log = createClient ( 3L , "client" , "3" , true , false , "RESULT" ) ; log . log ( ru . codeinside . gws . core . ExceptionProducer . fire ( "foo3" ) ) ; log . close ( ) ; "<AssertPlaceHolder>" ; } createLogDir ( ru . codeinside . gws . api . imp... | org . junit . Assert . assertFalse ( createLogDir ( log ) . exists ( ) ) |
testCalcErrorDiffValues ( ) { org . ebayopensource . turmeric . monitoring . provider . model . ExtendedErrorViewData errorViewData = new org . ebayopensource . turmeric . monitoring . provider . model . ExtendedErrorViewData ( ) ; errorViewData . setErrorCount1 ( 1L ) ; errorViewData . setErrorCount2 ( 2L ) ; errorVie... | org . junit . Assert . assertEquals ( expectedValue , java . lang . Double . valueOf ( errorViewData . getErrorDiff ( ) ) ) |
testGetAllEntityOrReferentToEntity ( ) { final java . util . Map < uk . gov . dstl . baleen . types . semantic . ReferenceTarget , uk . gov . dstl . baleen . types . semantic . Entity > referentMap = new java . util . HashMap ( ) ; final java . util . List < uk . gov . dstl . baleen . types . Base > list = uk . gov . d... | org . junit . Assert . assertEquals ( 5 , list . size ( ) ) |
testRemove ( ) { com . liferay . portal . kernel . model . Ticket newTicket = addTicket ( ) ; _persistence . remove ( newTicket ) ; com . liferay . portal . kernel . model . Ticket existingTicket = _persistence . fetchByPrimaryKey ( newTicket . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return ... | org . junit . Assert . assertNull ( existingTicket ) |
isoDateFormatWithLeadingNoFractions ( ) { java . util . Date date = dateFormat . parse ( "2011-04-21T10:13:40" ) ; "<AssertPlaceHolder>" ; } format ( java . util . Date ) { if ( date == null ) { return null ; } if ( date instanceof java . sql . Date ) { return format ( ( ( java . sql . Date ) ( date ) ) ) ; } else if (... | org . junit . Assert . assertEquals ( "2011-04-21T10:13:40" , dateFormat . format ( date ) ) |
testRulePlus ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "parser<sp>grammar<sp>P;\n" + ( "a<sp>:<sp>(b)+;\n" + "b<sp>:<sp>B;" ) ) ) ; java . lang . String expecting = "(rule<sp>a<sp>ARG<sp>RET<sp>scope<sp>(BLOCK<sp>(ALT<sp>(+<sp>(BLOCK<sp>(ALT<sp>b<sp><end-of-alt>)<sp><end-of-block>))<sp... | org . junit . Assert . assertEquals ( expecting , found ) |
factoryBeanAvailableTest ( ) { factory . bean . ClientServicePrototypeFactoryBean factory = applicationContext . getBean ( factory . bean . ClientServicePrototypeFactoryBean . class ) ; factory . ClientService clientService = factory . getObject ( ) ; "<AssertPlaceHolder>" ; } getObject ( ) { logger . info ( "getObject... | org . junit . Assert . assertNotNull ( clientService ) |
demonstrateHistoryAPI ( ) { java . util . List < com . blazegraph . gremlin . listener . BlazeGraphEdit > history = graph . history ( "a" ) . collect ( ) ; "<AssertPlaceHolder>" ; com . blazegraph . gremlin . structure . SampleCode . log . info ( ( ) -> history . stream ( ) ) ; } history ( java . util . List ) { final ... | org . junit . Assert . assertEquals ( 6 , history . size ( ) ) |
tesStringOneArgLocaleFrance_StringFormattedMessage ( ) { final java . lang . String testMsg = "Test<sp>message<sp>e<sp>=<sp>%+10.4f" ; final org . apache . logging . log4j . message . FormattedMessage msg = new org . apache . logging . log4j . message . FormattedMessage ( java . util . Locale . FRANCE , testMsg , Math ... | org . junit . Assert . assertEquals ( expected , result ) |
testCollectionsSortSingleColumnPrimitiveAscending ( ) { com . liferay . portal . kernel . model . EmailAddress emailAddress1 = newEmailAddress ( 1 , newDate ( 0 , 1 , 2012 ) , "abc@liferay.com" ) ; com . liferay . portal . kernel . model . EmailAddress emailAddress2 = newEmailAddress ( 2 , newDate ( 0 , 2 , 2012 ) , "a... | org . junit . Assert . assertEquals ( expectedList . toString ( ) , actualList . toString ( ) ) |
testGetParam ( ) { net . coobird . thumbnailator . ThumbnailParameter param = new net . coobird . thumbnailator . ThumbnailParameter ( new java . awt . Dimension ( 50 , 50 ) , null , true , "jpg" , net . coobird . thumbnailator . ThumbnailParameter . DEFAULT_FORMAT_TYPE , net . coobird . thumbnailator . ThumbnailParame... | org . junit . Assert . assertEquals ( param , task . getParam ( ) ) |
testMaxIn ( ) { java . util . Map < java . lang . String , java . lang . Object > map = com . google . common . collect . Maps . newHashMap ( ) ; java . util . List < java . lang . String > list = org . n3r . eql . util . C . classResourceToLines ( "order_no1.txt" ) ; map . put ( "list" , list ) ; long rows = new org .... | org . junit . Assert . assertTrue ( ( ( list . size ( ) ) >= rows ) ) |
sizeShouldBeZeroAfterInitialization ( ) { org . robobinding . widget . adapterview . LazyDataSetValueModelTest . DataSetValueModelUnderTest delegateValueModel = new org . robobinding . widget . adapterview . LazyDataSetValueModelTest . DataSetValueModelUnderTest ( org . robobinding . util . RandomValues . anyInteger ( ... | org . junit . Assert . assertThat ( valueModel . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.