input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
devePermitirCodigoPaisNulo ( ) { final com . fincatto . documentofiscal . nfe310 . classes . NFEndereco endereco = new com . fincatto . documentofiscal . nfe310 . classes . NFEndereco ( ) ; endereco . setBairro ( "67LQFlXOBK0JqAE1rFi2CEyUGW5Z8QmmHhzmZ9GABVLKa9AbV0uFR0onl7nU" ) ; endereco . setCep ( "88095550" ) ; ender... | org . junit . Assert . assertNotNull ( endereco . toString ( ) ) |
testCreateProfileSchema ( ) { org . kaaproject . kaa . common . dto . EndpointProfileSchemaDto profileSchema = createProfileSchema ( ) ; "<AssertPlaceHolder>" ; } strIsEmpty ( java . lang . String ) { return ( str == null ) || ( str . trim ( ) . equals ( "" ) ) ; } | org . junit . Assert . assertFalse ( strIsEmpty ( profileSchema . getId ( ) ) ) |
testAddConfigurationParameter ( ) { org . walkmod . commands . AddTransformationCommand command = new org . walkmod . commands . AddTransformationCommand ( "imports-cleaner" , "mychain" , false , null , null , null , null , false ) ; java . io . File aux = new java . io . File ( "src/test/resources/xmlparams" ) ; aux .... | org . junit . Assert . assertTrue ( ( ( output . contains ( "testParam" ) ) && ( output . contains ( "hello" ) ) ) ) |
canCRUDRoleAssignment ( ) { java . lang . String roleAssignmentName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomUuid ( ) ; java . lang . String spName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "sp" , 20 ) ... | org . junit . Assert . assertNotNull ( roleAssignment ) |
testSerialization ( ) { org . jfree . chart . annotations . XYTextAnnotation a1 = new org . jfree . chart . annotations . XYTextAnnotation ( "Text" , 10.0 , 20.0 ) ; a1 . setOutlinePaint ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . RED , 3.0F , 4.0F , java . awt . Color . BLUE ) ) ; org . jfree... | org . junit . Assert . assertEquals ( a1 , a2 ) |
firstValueShouldBeZero ( ) { org . ta4j . core . Indicator < org . ta4j . core . num . Num > indicator = getIndicator ( new org . ta4j . core . indicators . helpers . ClosePriceIndicator ( data ) , 14 ) ; "<AssertPlaceHolder>" ; } numOf ( java . lang . Number ) { return this . numFunction . apply ( number ) ; } | org . junit . Assert . assertEquals ( data . numOf ( 0 ) , indicator . getValue ( 0 ) ) |
test ( ) { System . out . println ( "---------Erstelle<sp>Job" ) ; org . kapott . hbci . GV . HBCIJob job = handler . newJob ( "---------Erstelle<sp>Job" 1 ) ; org . kapott . hbci . structures . Konto acc = new org . kapott . hbci . structures . Konto ( ) ; acc . blz = params . getProperty ( "value" 4 ) ; acc . number ... | org . junit . Assert . assertEquals ( "---------Erstelle<sp>Job" 0 , true , res . isOK ( ) ) |
findAll_RightResults ( ) { java . util . List < com . namespace . domain . UserGAE > userListToPersist = generateUsersAndPersistThem ( ) ; java . util . List < com . namespace . domain . UserGAE > userFromDatastoreList = this . dao . findAll ( ) ; "<AssertPlaceHolder>" ; compareIfList1ContainsList2Objects ( userListToP... | org . junit . Assert . assertEquals ( userFromDatastoreList . size ( ) , userListToPersist . size ( ) ) |
testPureWildcardRegistration ( ) { dispatch . register ( "http://*/" , sampleHandler ) ; org . kaazing . net . auth . ChallengeHandler challengeHandler = dispatch . lookup ( new org . kaazing . net . auth . ChallengeRequest ( "http://foo.example.com:80" , "test_challenge<sp>SOME<sp>CHALLENGE<sp>STRING" ) ) ; "<AssertPl... | org . junit . Assert . assertSame ( sampleHandler , challengeHandler ) |
test01createSupplierOrg ( ) { org . oscm . portal . PortalOrganizationWT . tester . visitPortal ( PortalPathSegments . CREATE_ORGANIZATION ) ; org . oscm . portal . PortalOrganizationWT . tester . writeValue ( PortalHtmlElements . CREATE_ORGANIZATION_INPUT_ADMINEMAIL , org . oscm . portal . PortalOrganizationWT . teste... | org . junit . Assert . assertTrue ( org . oscm . portal . PortalOrganizationWT . tester . getExecutionResult ( ) ) |
testLoadFromXML ( ) { org . geoserver . wps . WPSInfo wpsInfo = loadFromXml ( "wps-test.xml" ) ; "<AssertPlaceHolder>" ; } loadFromXml ( java . lang . String ) { org . geoserver . config . util . XStreamPersisterFactory factory = org . geoserver . platform . GeoServerExtensions . bean ( org . geoserver . config . util ... | org . junit . Assert . assertNotNull ( wpsInfo ) |
collisionCourseTestMethodOne ( ) { shell . addResource ( "${hiveconf:hadoop.tmp.dir}/foo/bar/data1.csv" , "1\n2\n3" ) ; shell . addResource ( "1\n2\n3" 4 , "4\n5" ) ; shell . addSetupScript ( "1\n2\n3" 5 ) ; shell . addSetupScript ( ( "" + ( ( ( "<sp>CREATE<sp>table<sp>foo.bar(id<sp>int)" + "<sp>ROW<sp>FORMAT<sp>DELIMI... | org . junit . Assert . assertEquals ( new java . util . HashSet ( expected ) , new java . util . HashSet ( actual ) ) |
targetType_whenPreferClients ( ) { list . add ( new com . hazelcast . simulator . coordinator . registry . WorkerData ( newParameters ( agent1 , 1 , "javaclient" , "maven=3.6" ) ) ) ; list . add ( new com . hazelcast . simulator . coordinator . registry . WorkerData ( newParameters ( agent1 , 2 , "member" , "maven=3.7"... | org . junit . Assert . assertEquals ( asList ( list . get ( 0 ) , list . get ( 2 ) ) , result ) |
doesNotMatchDifferentValues ( ) { matcher . withEntry ( "foo" , "bar" ) ; org . mockserver . matchers . MultiValueMapMatcher mapMatcher = new org . mockserver . matchers . MultiValueMapMatcher ( new org . mockserver . logging . MockServerLogger ( ) , matcher ) ; matched . withEntry ( "foo" , "bar2" ) ; "<AssertPlaceHol... | org . junit . Assert . assertFalse ( mapMatcher . matches ( null , matched ) ) |
testUnknownAppInRM ( ) { org . apache . hadoop . mapreduce . v2 . api . MRClientProtocol historyServerProxy = mock ( org . apache . hadoop . mapreduce . v2 . api . MRClientProtocol . class ) ; when ( historyServerProxy . getJobReport ( getJobReportRequest ( ) ) ) . thenReturn ( getJobReportResponse ( ) ) ; org . apache... | org . junit . Assert . assertNotNull ( jobStatus ) |
testGetBackSlashForRegex ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getBackSlashForRegex ( ) { return "\\\\" ; } | org . junit . Assert . assertNotNull ( dbms . getBackSlashForRegex ( ) ) |
shouldAssignAndCastViewContextToFieldsAnnotatedWithContext ( ) { class SpecificContext extends com . redhat . darcy . ui . testing . doubles . DummyContext { } class TestView extends com . redhat . darcy . ui . AbstractView { @ com . redhat . darcy . ui . annotations . Context private SpecificContext castedContext ; } ... | org . junit . Assert . assertEquals ( testView . getContext ( ) , testView . castedContext ) |
testSetClusterNode ( ) { final org . bonitasoft . engine . queriablelogger . model . builder . SQueriableLogBuilder builder = fact . createNewInstance ( ) ; builder . clusterNode ( "node1" ) . severity ( SQueriableLogSeverity . BUSINESS ) ; builder . actionType ( "variable_update" ) . actionScope ( "myVar" ) . rawMessa... | org . junit . Assert . assertEquals ( "node1" , queriableLog . getClusterNode ( ) ) |
testAvroToDiFloat ( ) { java . lang . String expectedType = "id_Float" ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _float ( ) ; "<AssertPlaceHolder>" ; } avroToDi ( org . apache . avro . Schema ) { org . apache . avro . Schema typeSchema = org . talend . daikon . avro . AvroU... | org . junit . Assert . assertEquals ( expectedType , org . talend . codegen . converter . TypeConverter . avroToDi ( fieldSchema ) ) |
test ( ) { org . folio . okapi . common . OkapiToken t = new org . folio . okapi . common . OkapiToken ( ) ; io . vertx . core . json . JsonObject o = new io . vertx . core . json . JsonObject ( ) ; o . put ( "tenant" , "test-lib" ) ; o . put ( "foo" , "bar" ) ; java . lang . String s = o . encodePrettily ( ) ; byte [ ... | org . junit . Assert . assertEquals ( "test-lib" , t . getTenant ( ) ) |
testDecodeTripletFirst ( ) { java . util . List < java . lang . String > encoded = java . util . Arrays . asList ( opennlp . tools . namefind . BioCodecTest . B_START , opennlp . tools . namefind . BioCodecTest . B_CONTINUE , opennlp . tools . namefind . BioCodecTest . B_CONTINUE , opennlp . tools . namefind . BioCodec... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testSingleLongRandom ( ) { java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( Long . BYTES ) ; java . util . Random random = new java . util . Random ( ) ; for ( long i = 0 ; i < 1000 ; i ++ ) { long x = random . nextLong ( ) ; buffer . putLong ( 0 , x ) ; "<AssertPlaceHolder>" ; } } hash32 ( long ) ... | org . junit . Assert . assertEquals ( org . apache . hive . common . util . Murmur3 . hash32 ( buffer . array ( ) ) , org . apache . hive . common . util . Murmur3 . hash32 ( x ) ) |
testDefaultFormatRealVectorImpl ( ) { java . util . Locale defaultLocal = java . util . Locale . getDefault ( ) ; java . util . Locale . setDefault ( getLocale ( ) ) ; org . hipparchus . linear . ArrayRealVector c = new org . hipparchus . linear . ArrayRealVector ( new double [ ] { 232.22222222222 , - 342.3333333333 , ... | org . junit . Assert . assertEquals ( expected , actual ) |
chain_order_enforced ( ) { com . amazon . ask . request . exception . handler . GenericExceptionHandler < com . amazon . ask . sdk . TestHandlerInput , com . amazon . ask . sdk . TestHandlerOutput > handler1 = mock ( com . amazon . ask . request . exception . handler . GenericExceptionHandler . class ) ; when ( handler... | org . junit . Assert . assertEquals ( chain . getHandler ( new com . amazon . ask . sdk . TestHandlerInput ( ) , new java . lang . IllegalArgumentException ( ) ) . get ( ) , handler1 ) |
writeWithGarbageDataDoesNothing ( ) { when ( this . patient . < org . phenotips . data . Medication > getData ( MedicationController . DATA_NAME ) ) . thenReturn ( new org . phenotips . data . IndexedPatientData ( org . phenotips . data . internal . controller . MedicationController . DATA_NAME , java . util . Collecti... | org . junit . Assert . assertEquals ( 0 , json . length ( ) ) |
getLongValue_A$Crontab ( ) { java . lang . String arg0 = "123sec" ; long actual = parser . getLongValue ( arg0 ) ; long expected = 123L ; "<AssertPlaceHolder>" ; } getLongValue ( java . lang . String ) { return java . lang . Long . valueOf ( number . replaceAll ( "[^\\d]+" , "" ) ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testConvertAll ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; org . lnu . is . domain . paper . usage . PaperUsage expected = new org . lnu . is . domain . paper . usage . PaperUsage ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; org . lnu . is . r... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
leesAlsPersoonCacheWelEnAfnemerindicatiesCacheNietBestaat ( ) { final java . lang . Integer persoonId = 2000001 ; final org . springframework . transaction . TransactionStatus transactieStatus = zorgDatBlobBestaatInTransactie ( persoonId ) ; transactionManager . commit ( transactieStatus ) ; final nl . bzk . brp . mode... | org . junit . Assert . assertThat ( persoonUitCache . getAfnemerindicaties ( ) . size ( ) , org . hamcrest . Matchers . is ( 2 ) ) |
testBerichtException ( ) { nl . bzk . brp . bevraging . ws . service . brp . BerichtException e = new nl . bzk . brp . bevraging . ws . service . brp . BerichtException ( 2L ) ; "<AssertPlaceHolder>" ; } getBerichtId ( ) { return berichtId ; } | org . junit . Assert . assertEquals ( 2L , e . getBerichtId ( ) ) |
testCase88 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase88 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , branch_conditions . size ( ) ) |
check_update_sqlTimestamp ( ) { org . nutz . dao . test . normal . SupportedFieldTypeTest . EntityTypes exp = new org . nutz . dao . test . normal . SupportedFieldTypeTest . EntityTypes ( ) ; exp . name = "T" ; java . sql . Timestamp tm = new java . sql . Timestamp ( java . lang . System . currentTimeMillis ( ) ) ; exp... | org . junit . Assert . assertEquals ( ( ( tm . getTime ( ) ) / 1000 ) , ( ( exp . sqlDT . getTime ( ) ) / 1000 ) ) |
data0 ( ) { final java . lang . String query = "let<sp>$a<sp>:=<sp><a><b>1</b><b>1</b></a><sp>" + "for<sp>$b<sp>in<sp>$a/b[data()<sp>=<sp>'1']<sp>return<sp>$b" ; final org . xmldb . api . base . ResourceSet result = org . exist . xquery . XQueryFunctionsTest . existEmbeddedServer . executeQuery ( query ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( 2 , result . getSize ( ) ) |
testGetLocatorsForReRollSameAsStorageGranularity ( ) { boolean isReroll = true ; com . rackspacecloud . blueflood . rollup . SlotKey destSlotKey = com . rackspacecloud . blueflood . rollup . SlotKey . of ( Granularity . MIN_20 , 0 , TEST_SHARD ) ; com . rackspacecloud . blueflood . rollup . Granularity delayedMetricsRe... | org . junit . Assert . assertEquals ( delayedLocators . size ( ) , locatorsForRollup . size ( ) ) |
multipleEventsCase001 ( ) { processedUsages = usageRollupProcessor . processRecords ( allUsageRecordsInOrder , hourToRollup , lbsActiveDuringHour ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . service . domain . entities . Usage actualUsage = processedUsages . get ( 0 ) ; org . openstack . atlas . usagerefactor ... | org . junit . Assert . assertEquals ( 5 , processedUsages . size ( ) ) |
shouldNotEvaluateToEqualDifferentId ( ) { final org . apache . tinkerpop . gremlin . structure . util . reference . ReferenceVertex originalMarko = org . apache . tinkerpop . gremlin . structure . util . reference . ReferenceFactory . detach ( g . V ( convertToVertexId ( "marko" ) ) . next ( ) ) ; final org . apache . ... | org . junit . Assert . assertFalse ( org . apache . tinkerpop . gremlin . structure . util . reference . ReferenceFactory . detach ( secondMarko ) . equals ( originalMarko ) ) |
shouldParseDateExtendFormat ( ) { java . util . Calendar parseIso8601 = iso8601 . toCalendar ( "1982-06-10" ) ; java . util . Calendar date = java . util . GregorianCalendar . getInstance ( java . util . TimeZone . getTimeZone ( "GMT" ) ) ; date . set ( 1982 , 5 , 10 , 0 , 0 , 0 ) ; date . set ( Calendar . MILLISECOND ... | org . junit . Assert . assertThat ( parseIso8601 , org . hamcrest . Matchers . is ( date ) ) |
shouldBeFalseIfPropertyExistsButisInvalid ( ) { java . lang . System . setProperty ( "foo.bar" , "foobar" ) ; "<AssertPlaceHolder>" ; } isActive ( org . togglz . core . repository . FeatureState , org . togglz . core . user . FeatureUser ) { return true ; } | org . junit . Assert . assertFalse ( strategy . isActive ( state , user ) ) |
initialize_A$ClassMeta ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; org . junithelper . core . extractor . ArgTypeMetaExtractor target = new org . junithelper . core . extractor . ArgTypeMetaExtractor ( config ) ; org . junithelper . core .... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldAggregateWithTuple2BinaryOperator ( ) { final java . lang . String property1 = "property<sp>1" ; final java . lang . String property2 = "property<sp>2" ; final java . util . function . BinaryOperator func1 = new uk . gov . gchq . gaffer . function . ExampleTuple2BinaryOperator ( ) ; final uk . gov . gchq . gaffer... | org . junit . Assert . assertEquals ( props2 , state ) |
initialCrawlThrowsDee ( ) { com . amihaiemil . charles . WebCrawl initial = org . mockito . Mockito . mock ( com . amihaiemil . charles . WebCrawl . class ) ; com . amihaiemil . charles . WebCrawl failsafe = org . mockito . Mockito . mock ( com . amihaiemil . charles . WebCrawl . class ) ; org . mockito . Mockito . doT... | org . junit . Assert . assertTrue ( ex . getMessage ( ) . equals ( "Dee<sp>on<sp>initial<sp>crawl!" ) ) |
testExtractCreatedOrUpdated ( ) { java . util . Map < org . opendaylight . yangtools . yang . binding . InstanceIdentifier < org . opendaylight . yangtools . yang . binding . DataObject > , org . opendaylight . yangtools . yang . binding . DataObject > result = new java . util . HashMap ( ) ; org . powermock . api . mo... | org . junit . Assert . assertEquals ( testResult , org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . extractCreatedOrUpdated ( changes , klazz ) ) |
testCreateSheetInWorkspace ( ) { server . setResponseBody ( new java . io . File ( "src/test/resources/createSheet.json" ) ) ; com . smartsheet . api . internal . ArrayList < com . smartsheet . api . internal . Column > list = new com . smartsheet . api . internal . ArrayList < com . smartsheet . api . internal . Colum... | org . junit . Assert . assertEquals ( 2 , newSheet . getColumns ( ) . size ( ) ) |
emptyPageBecomesNullPage ( ) { net . fortytwo . smsn . server . actions . SetProperties action = new net . fortytwo . smsn . server . actions . SetProperties ( ) ; action . setId ( atom . getId ( ) ) ; action . setName ( SemanticSynchrony . PropertyKeys . TEXT ) ; action . setValue ( "<sp>\n<sp>" ) ; perform ( action )... | org . junit . Assert . assertNull ( atom . getText ( ) ) |
testNameInvalid ( ) { tested . getDiagramSet ( ) . setName ( new org . kie . workbench . common . stunner . bpmn . definition . property . general . Name ( org . kie . workbench . common . stunner . cm . definition . CaseManagementDiagramTest . NAME_INVALID ) ) ; java . util . Set < javax . validation . ConstraintViola... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
test130b ( ) { java . lang . String myName = "Test.Name" ; java . lang . Object myValue = new java . lang . Object ( ) { @ org . apache . commons . jexl3 . Override public java . lang . String toString ( ) { return "Test.Value" ; } } ; org . apache . commons . jexl3 . JexlEngine myJexlEngine = new org . apache . common... | org . junit . Assert . assertEquals ( myValue , myObjectWithTernaryConditional ) |
deveObterIdentificadorComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo ( ) ; final java . lang . String identificador = "ID798456123" ; protocoloInfo . setIdentificador ( identificado... | org . junit . Assert . assertEquals ( identificador , protocoloInfo . getIdentificador ( ) ) |
getUser ( ) { com . xkcoding . orm . beetlsql . entity . User user = userService . getUser ( 1L ) ; "<AssertPlaceHolder>" ; log . debug ( "user=<sp>{}" , user ) ; } getUser ( java . lang . Long ) { return userDao . single ( id ) ; } | org . junit . Assert . assertNotNull ( user ) |
flatMapAlreadyDoneExecutionExceptionTest ( ) { java . lang . Exception failure = new java . lang . Exception ( ) ; org . threadly . concurrent . future . ListenableFuture < ? > lf = makeListenableFutureFactory ( ) . makeWithFailure ( failure ) ; java . util . concurrent . atomic . AtomicBoolean mapperRan = new java . u... | org . junit . Assert . assertTrue ( mappedLF . isDone ( ) ) |
testTransform ( ) { this . writer = org . opendaylight . protocol . bgp . rib . impl . AdjRibInWriter . create ( org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier . of ( Rib . QNAME ) , PeerRole . Ebgp , this . ptc ) ; "<AssertPlaceHolder>" ; final org . opendaylight . yangtools . yang . data ... | org . junit . Assert . assertNotNull ( this . writer ) |
TopWikipediaSessionsTest ( ) { com . datatorrent . api . LocalMode lma = com . datatorrent . api . LocalMode . newInstance ( ) ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( false ) ; conf . set ( "dt.application.TopWikipediaSessions.operator.console.silent" , "... | org . junit . Assert . assertTrue ( isInOrder ( TopWikipediaSessions . Collector . getResult ( ) . get ( i ) ) ) |
getMillisAtShardKeyWeeklyTest ( ) { java . lang . Long millistamp = java . lang . System . currentTimeMillis ( ) ; java . util . UUID startingUUID = com . datastax . driver . core . utils . UUIDs . startOf ( millistamp ) ; com . pardot . rhombus . TimebasedShardingStrategy shardingStrategy = new com . pardot . rhombus ... | org . junit . Assert . assertEquals ( counter , actual ) |
testDeclaredSlidingWindow ( ) { org . drools . model . WindowReference var_DeclaredWindow = org . drools . model . FlowDSL . window ( org . drools . model . WindowDefinition . Type . TIME , 5 , java . util . concurrent . TimeUnit . SECONDS , org . drools . modelcompiler . domain . StockTick . class , ( _this ) -> _this... | org . junit . Assert . assertEquals ( 2 , ksession . fireAllRules ( ) ) |
testJsonArrayGetBoolean ( ) { io . vertx . codetrans . JsonTest . array = new io . vertx . core . json . JsonArray ( ) . add ( true ) ; runAll ( "json/JsArray" , "getBoolean" , ( ) -> { "<AssertPlaceHolder>" ; } ) ; } runAll ( java . lang . String , java . lang . String , io . vertx . codetrans . Map , java . lang . Ru... | org . junit . Assert . assertEquals ( true , io . vertx . codetrans . JsonTest . o ) |
runTest ( ) { boolean result = checkNoError ( "Social_Files_Upload_Public_File" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
subscribeToService_setCutOffDayReseller ( ) { int cutOffDay = 8 ; setCutOffDayForOrganization ( reseller . getKey ( ) , cutOffDay ) ; container . login ( java . lang . String . valueOf ( resellerAdmin . getKey ( ) ) , org . oscm . subscriptionservice . bean . ROLE_ORGANIZATION_ADMIN ) ; org . oscm . internal . vo . VOS... | org . junit . Assert . assertEquals ( cutOffDay , getCutOffDayFromSubscription ( voSubscription . getKey ( ) ) ) |
convertToQueryBuilderWrongParamValue ( ) { org . apache . sling . testing . mock . sling . servlet . MockSlingHttpServletRequest request = context . request ( ) ; request . setParameterMap ( com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > builder ( ) . put ( "_ctqb" , "b... | org . junit . Assert . assertFalse ( com . adobe . acs . commons . contentfinder . querybuilder . impl . viewhandler . GQLToQueryBuilderConverter . convertToQueryBuilder ( request ) ) |
checkSetRenderingHint ( ) { this . g2 . setRenderingHint ( RenderingHints . KEY_STROKE_CONTROL , RenderingHints . VALUE_STROKE_PURE ) ; "<AssertPlaceHolder>" ; } getRenderingHint ( java . awt . RenderingHints$Key ) { return this . hints . get ( hintKey ) ; } | org . junit . Assert . assertEquals ( RenderingHints . VALUE_STROKE_PURE , this . g2 . getRenderingHint ( RenderingHints . KEY_STROKE_CONTROL ) ) |
onConnectionLostMapsInvalidProtocolVersionException ( ) { new tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . NonStrictExpectations ( ) { { mockedMqttException . getReasonCode ( ) ; result = org . eclipse . paho . client . mqttv3 . MqttException . REASON_CODE_INVALID_PROTOC... | org . junit . Assert . assertTrue ( ( e instanceof tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttRejectedProtocolVersionException ) ) |
testFlatSerde_1 ( ) { lombok . val arrayX = org . nd4j . linalg . factory . Nd4j . create ( new int [ ] { 1 , 2 , 3 , 4 } , new long [ ] { 4 } , DataType . INT ) ; lombok . val builder = new com . google . flatbuffers . FlatBufferBuilder ( 512 ) ; lombok . val flat = arrayX . toFlatArray ( builder ) ; builder . finish ... | org . junit . Assert . assertEquals ( arrayX , restored ) |
startsWith_A$Seq_containsNull2 ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( 1 , null , 2 , 3 ) ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > that = com . m3 . scalaflavor4j . Seq . apply ( 1 , null , 2 ) ; boolean actual = seq . startsWith ( ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testEvaluateQuery ( ) { com . huawei . streaming . datasource . DataSourceContainer datasource = createDataSource ( ) ; java . util . Map < java . lang . String , java . lang . Object > cqlresults = prepareCQLArgResults ( datasource ) ; try { datasource . initialize ( ) ; datasource . evaluate ( cqlresults ) ; org . ju... | org . junit . Assert . assertTrue ( true ) |
testPluralizeWhenEmpty ( ) { "<AssertPlaceHolder>" ; } pluralize ( java . lang . String ) { return com . openshift . restclient . ResourceKind . pluralize ( kind , false , false ) ; } | org . junit . Assert . assertEquals ( "" , com . openshift . restclient . ResourceKind . pluralize ( "<sp>" ) ) |
getNoTablesFilteredByEmptySetOfTypes ( ) { final java . sql . ResultSet rs = this . metaData . getTables ( null , null , null , new java . lang . String [ 0 ] ) ; int tableCount = rsSizeOf ( rs ) ; "<AssertPlaceHolder>" ; } rsSizeOf ( java . sql . ResultSet ) { int tableCount = 0 ; while ( rs . next ( ) ) { tableCount ... | org . junit . Assert . assertThat ( tableCount , org . hamcrest . Matchers . is ( 0 ) ) |
testNextIntExtremeValues ( ) { int x = randomData . nextInt ( Integer . MIN_VALUE , Integer . MAX_VALUE ) ; int y = randomData . nextInt ( Integer . MIN_VALUE , Integer . MAX_VALUE ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( ( x == y ) ) |
removeAllViews_shouldCallOnChildViewRemovedWithEachChild ( ) { android . view . View view = new android . view . View ( context ) ; android . view . ViewGroup viewGroup = new android . widget . FrameLayout ( context ) ; viewGroup . addView ( view ) ; org . robolectric . shadows . ShadowViewGroupTest . TestOnHierarchyCh... | org . junit . Assert . assertTrue ( testListener . wasCalled ( ) ) |
testOrderBy ( ) { int offset = 0 ; int limit = 20 ; long count = 1 ; java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "name" ; org . lnu . is . resource . address . type . AddressTypeResource resource = new org . lnu . is . resource . address . type . AddressTypeResource ( ) ; resource . set... | org . junit . Assert . assertEquals ( expected , actual ) |
testSetDefaultMetric ( ) { reachability . setDefaultMetric ( ( ( byte ) ( 0 ) ) ) ; result2 = reachability . defaultMetric ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; } | org . junit . Assert . assertThat ( result2 , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 0 ) ) ) ) |
testVerwantschapBroerKrijgtKindMetZus ( ) { final nl . bzk . brp . model . operationeel . kern . ActieModel actie = new nl . bzk . brp . model . operationeel . kern . ActieModel ( new nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortActieAttribuut ( nl . bzk . brp . model . algemeen . stamgegeven . kern . ... | org . junit . Assert . assertTrue ( resultaat ) |
testGetCurrentHistoryUserCallerPrincipalNull ( ) { doReturn ( null ) . when ( sessionContext ) . getCallerPrincipal ( ) ; doReturn ( null ) . when ( em ) . find ( any ( java . lang . Class . class ) , any ( ) ) ; dataService . find ( org . oscm . dataservice . bean . PlatformUser . class , 0 ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( "" , org . oscm . dataservice . bean . DataServiceBean . getCurrentHistoryUser ( ) ) |
testGetPrincipalProviderFromIncompleteCallback ( ) { org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModule loginModule = org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModuleTest . initLoginModule ( org . apache . jackrabbit . oak . spi . security . au... | org . junit . Assert . assertNull ( loginModule . getPrincipalProvider ( ) ) |
shouldConvertIterableOfObjectsToArray ( ) { final java . lang . Object [ ] originalArray = new java . lang . Object [ ] { new uk . gov . gchq . gaffer . data . element . Entity ( "entity" ) , new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( "edge" ) , new uk . gov . gchq . gaffer . operation... | org . junit . Assert . assertArrayEquals ( originalArray , results ) |
testRegularTopNWithEmptyDataSetAndNoneOutcome ( ) { inputContainer . add ( emptyInputRowSet . container ( ) ) ; inputOutcomes . add ( RecordBatch . IterOutcome . NONE ) ; final org . apache . drill . exec . physical . impl . MockRecordBatch mockInputBatch = new org . apache . drill . exec . physical . impl . MockRecord... | org . junit . Assert . assertTrue ( ( ( topNBatch . next ( ) ) == ( RecordBatch . IterOutcome . NONE ) ) ) |
testMixedSimpleAdd ( ) { junit . samples . money . IMoney expected = junit . samples . money . MoneyBag . create ( f12CHF , f7USD ) ; "<AssertPlaceHolder>" ; } add ( org . junit . rules . TestRule ) { testRules . add ( testRule ) ; } | org . junit . Assert . assertEquals ( expected , f12CHF . add ( f7USD ) ) |
dateHeader ( ) { just . niubi . httprequest . HttpRequestTest . handler = new just . niubi . httprequest . RequestHandler ( ) { @ just . niubi . httprequest . Override public void handle ( org . eclipse . jetty . server . Request request , javax . servlet . http . HttpServletResponse response ) { response . setStatus (... | org . junit . Assert . assertEquals ( 66000 , get ( just . niubi . httprequest . HttpRequestTest . url ) . date ( ) ) |
testRenameDirectoryConcurrent ( ) { org . junit . Assume . assumeTrue ( renameSupported ( ) ) ; org . apache . hadoop . fs . Path src = this . path ( "/test/hadoop/file/" ) ; org . apache . hadoop . fs . Path child1 = this . path ( "/test/hadoop/file/1" ) ; org . apache . hadoop . fs . Path child2 = this . path ( "/tes... | org . junit . Assert . assertEquals ( 4 , this . fs . listStatus ( dst ) . length ) |
testOctetCounting ( ) { handler . setSyslogType ( SyslogType . RFC5424 ) ; handler . setUseMessageDelimiter ( false ) ; handler . setUseCountingFraming ( true ) ; final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; handler . setOutputStream ( out ) ; final java . util . Calendar ca... | org . junit . Assert . assertEquals ( expectedMessage , org . jboss . logmanager . ext . handlers . SyslogHandlerTests . createString ( out ) ) |
testDeleteDataInDefaultGraph ( ) { java . lang . String queryStr = "PREFIX<sp>dc:<sp><http://purl.org/dc/elements/1.1/><sp>DELETE<sp>DATA<sp>{<sp>\n" + "<http://example/book1><sp>dc:title<sp>\"A<sp>new<sp>book\"<sp>;<sp>dc:creator<sp>\"A.N.Other\"<sp>.<sp>}" ; org . apache . clerezza . rdf . core . sparql . SparqlPrePa... | org . junit . Assert . assertTrue ( referredGraphs . toArray ( ) [ 0 ] . equals ( org . apache . clerezza . rdf . core . sparql . SparqlPreParserTest . DEFAULT_GRAPH ) ) |
testWithNull ( ) { final boolean [ ] nextCalled = new boolean [ 1 ] ; greycat . Tasks . newTask ( ) . thenDo ( new greycat . ActionFunction ( ) { @ greycatTest . internal . task . Override public void eval ( greycat . TaskContext ctx ) { ctx . continueWith ( null ) ; } } ) . then ( setAttribute ( "name" , Type . STRING... | org . junit . Assert . assertTrue ( nextCalled [ 0 ] ) |
testIsColumnCreationEnabledWhenActiveDecisionTableHasEditableColumns ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter dtPresenter = mock ( GuidedDecisionTableView . Presenter . class ) ; doReturn ( false ) . when ( dtPresenter ) . isReadOnl... | org . junit . Assert . assertTrue ( isColumnCreationEnabled ) |
testComposeCloseables ( ) { final int [ ] counter = new int [ ] { 0 } ; final java . io . Closeable closeable = new java . io . Closeable ( ) { @ com . annimon . stream . internal . Override public void close ( ) throws java . io . IOException { ( counter [ 0 ] ) ++ ; } } ; java . lang . Runnable composed = com . annim... | org . junit . Assert . assertThat ( counter [ 0 ] , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testIntSorting ( ) { java . lang . String str = "global<sp>java.util.List<sp>list\n" + ( ( ( ( ( ( ( ( "rule<sp>R\n" + "dialect<sp>\"mvel\"\n" ) + "when\n" ) + "<sp>$number<sp>:<sp>Number()\n" ) + "<sp>not<sp>Number(intValue<sp><<sp>$number.intValue)\n" ) + "then\n" ) + "when\n" 1 ) + "<sp>delete($number);\n" ) + "when... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 , 2 , 4 , 5 , 6 ) , list ) |
testGetChannelNotExists ( ) { thrown . expect ( org . hyperledger . fabric . sdk . exception . NetworkConfigurationException . class ) ; thrown . expectMessage ( "Channel<sp>MissingChannel<sp>not<sp>found<sp>in<sp>configuration<sp>file.<sp>Found<sp>channel<sp>names:<sp>foo" ) ; java . io . File f = new java . io . File... | org . junit . Assert . assertNotNull ( config ) |
testEmptyLocalACL ( ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . createDocumentModel ( "/" , "folder" , "Folder" ) ; doc = session . createDocument ( doc ) ; org . nuxeo . ecm . core . api . security . ACP acp = doc . getACP ( ) ; org . nuxeo . ecm . core . api . security . ACL acl = acp . getOrCr... | org . junit . Assert . assertNull ( acl ) |
fetchSecuritiesTest ( ) { storeSecurityTest ( ) ; java . util . concurrent . atomic . AtomicInteger counter = new java . util . concurrent . atomic . AtomicInteger ( 2 ) ; java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 2 ) ; java . lang . Thread th1 = new java . lang .... | org . junit . Assert . assertEquals ( 0 , counter . get ( ) ) |
jsonLiteralObjectKeysWithEscapedBackslashesAreAllowed ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = JsonLiteral ( "{\"c:\\\\\\\\windows\\\\path\":1}" ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "`{\"c:\\\\\\\\windows\\\\path\":1}`" ) ; "<AssertPlaceHol... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
unbalancedPropertyFeedWithInlineFeed ( ) { org . apache . olingo . odata2 . api . edm . Edm edm = org . apache . olingo . odata2 . testutil . mock . MockFacade . getMockEdm ( ) ; org . apache . olingo . odata2 . api . edm . EdmTyped imageUrlProperty = edm . getEntityType ( "RefScenario" , "EmployeeId" 6 ) . getProperty... | org . junit . Assert . assertNotNull ( xmlString ) |
testParseFlatTree ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz . c... | org . junit . Assert . assertTrue ( valid ) |
testMakeMetricDatum ( ) { org . sagebionetworks . cloudwatch . ProfileData pd = new org . sagebionetworks . cloudwatch . ProfileData ( ) ; pd . setValue ( 123.0 ) ; pd . setName ( "name" ) ; pd . setNamespace ( "nameSpace" ) ; pd . setTimestamp ( new java . util . Date ( ) ) ; pd . setUnit ( "Count" ) ; com . amazonaws... | org . junit . Assert . assertEquals ( expectedDatum , mdResult ) |
testReadWithReadOnlyTransactionClosed ( ) { org . opendaylight . controller . sal . core . spi . data . DOMStoreReadTransaction readTx = domStore . newReadOnlyTransaction ( ) ; "<AssertPlaceHolder>" ; readTx . close ( ) ; org . opendaylight . controller . md . sal . dom . store . impl . InMemoryDataStoreTest . doReadAn... | org . junit . Assert . assertNotNull ( readTx ) |
testEpsilon ( ) { final int dataSize = 10000 ; final int querySize = 30 ; final org . apache . mahout . common . distance . DistanceMeasure metric = new org . apache . mahout . common . distance . EuclideanDistanceMeasure ( ) ; final java . util . List < java . lang . Integer > scales = com . google . common . collect ... | org . junit . Assert . assertTrue ( ( averageOverlap > 7 ) ) |
testOwnersActions ( ) { final java . lang . String resourceId = ( SamConstants . WORKFLOW_PREFIX ) + ( io . dockstore . webservice . permissions . sam . SamPermissionsImplTest . FOO_WORKFLOW_NAME ) ; when ( resourcesApiMock . resourceAction ( SamConstants . RESOURCE_TYPE , resourceId , io . dockstore . webservice . per... | org . junit . Assert . assertEquals ( Role . Action . values ( ) . length , actions . size ( ) ) |
testShuffleFragment ( ) { double [ ] a = new double [ 100 ] ; for ( int i = a . length ; ( i -- ) != 0 ; ) a [ i ] = - 1 ; for ( int i = 10 ; i < 30 ; i ++ ) a [ i ] = i - 10 ; double [ ] [ ] b = it . unimi . dsi . fastutil . doubles . DoubleBigArrays . wrap ( a ) ; it . unimi . dsi . fastutil . doubles . DoubleBigArra... | org . junit . Assert . assertFalse ( c [ ( ( int ) ( it . unimi . dsi . fastutil . doubles . DoubleBigArrays . get ( b , ( i + 10 ) ) ) ) ] ) |
testFormatInitTimeMillis ( ) { com . sun . mail . util . logging . CollectorFormatter f = new com . sun . mail . util . logging . CollectorFormatter ( "{10}" , ( ( java . util . logging . Formatter ) ( null ) ) , ( ( com . sun . mail . util . logging . Comparator < com . sun . mail . util . logging . LogRecord > ) ( nu... | org . junit . Assert . assertTrue ( init . equals ( f . getTail ( ( ( com . sun . mail . util . logging . Handler ) ( null ) ) ) ) ) |
test_insert_by_filter ( ) { final org . nutz . dao . test . meta . Pet p = org . nutz . dao . test . normal . FieldFilterTest . pet ( "xh" ) . setNickName ( "XiaoHei" ) ; org . nutz . dao . FieldFilter . create ( org . nutz . dao . test . meta . Pet . class , "id|name" ) . run ( new org . nutz . trans . Atom ( ) { publ... | org . junit . Assert . assertNull ( p2 . getNickName ( ) ) |
testSwitchTwoBoundVars ( ) { final java . lang . String query1 = "" + ( ( ( ( ( ( ( ( ( "SELECT<sp>?a<sp>?b<sp>?c<sp>" + "{" ) + "<sp>?a<sp><uri:p0><sp>?c<sp>." ) + "<sp>?b<uri:p1><sp>?c<sp>." 1 ) + "<sp>?b<uri:p1><sp>?c<sp>." 0 ) + "<sp>?b<uri:p1><sp>?c<sp>." ) + "<sp>OPTIONAL{<sp>?a<sp><uri:p1><sp>?b<sp>}<sp>." ) + "... | org . junit . Assert . assertEquals ( true , validatePcj ( te1 , unOpt , externalList , unMatchedNodes ) ) |
testInt8Array ( ) { final de . mirkosertic . bytecoder . api . web . Int8Array a = de . mirkosertic . bytecoder . api . web . OpaqueArrays . createInt8Array ( 10 ) ; a . set ( 1 , ( ( byte ) ( 99 ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return data . get ( aValue ) ; } | org . junit . Assert . assertEquals ( ( ( byte ) ( 99 ) ) , a . get ( 1 ) , 0 ) |
lockBasics ( ) { org . apache . jackrabbit . oak . plugins . index . importer . AbortingIndexerLock lock = new org . apache . jackrabbit . oak . plugins . index . importer . AbortingIndexerLock ( infoService ) ; when ( statsMBean . getStatus ( ) ) . thenReturn ( IndexStatsMBean . STATUS_DONE ) ; org . apache . jackrabb... | org . junit . Assert . assertNotNull ( lockToken ) |
testGetExtensions ( ) { final java . lang . String [ ] exts = filter . getExtensions ( ) ; "<AssertPlaceHolder>" ; } getExtensions ( ) { return extensions ; } | org . junit . Assert . assertEquals ( 2 , exts . length ) |
testSaveDocuments ( ) { when ( solrClientMock . add ( eq ( org . springframework . data . solr . core . SolrTemplateTests . COLLECTION_NAME ) , anyCollection ( ) , eq ( ( - 1 ) ) ) ) . thenReturn ( new org . apache . solr . client . solrj . response . UpdateResponse ( ) ) ; java . util . List < org . apache . solr . co... | org . junit . Assert . assertNotNull ( updateResponse ) |
testContainsWithLater ( ) { au . gov . ga . earthsci . core . temporal . BigTime start = new au . gov . ga . earthsci . core . temporal . BigTime ( java . math . BigInteger . valueOf ( 1000 ) ) ; au . gov . ga . earthsci . core . temporal . BigTime end = new au . gov . ga . earthsci . core . temporal . BigTime ( java .... | org . junit . Assert . assertFalse ( period1 . contains ( test ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.