input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . wave . type . WaveType context = new org . lnu . is . domain . wave . type . WaveType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>WaveType<sp>e<sp>" ; org . lnu . is . pa... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
graph_txn_2 ( ) { org . apache . jena . graph . Graph g = dsg . getDefaultGraph ( ) ; org . apache . jena . graph . Triple t = org . apache . jena . sparql . sse . SSE . parseTriple ( "(:S<sp>:P<sp>:O)" ) ; g . getTransactionHandler ( ) . execute ( ( ) -> g . add ( t ) ) ; org . apache . jena . graph . Graph g2 = dsg .... | org . junit . Assert . assertTrue ( g . contains ( t ) ) |
testGetNumberOfUsers ( ) { getTransactionService ( ) . begin ( ) ; final long numberOfUsers = org . bonitasoft . engine . identity . IdentityServiceTest . identityService . getNumberOfUsers ( ) ; final org . bonitasoft . engine . identity . model . SUser user = org . bonitasoft . engine . builder . BuilderFactory . get... | org . junit . Assert . assertEquals ( ( numberOfUsers + 1 ) , org . bonitasoft . engine . identity . IdentityServiceTest . identityService . getNumberOfUsers ( ) ) |
one_$parent_multiple_value_comparison_returns_true_when_field_value_matches_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{<sp>'$and'<sp>:<sp>[<sp>{'field':'field4','op':'>','rvalue':3.5},{'field':'field6.nf7.$paren... | org . junit . Assert . assertTrue ( ctx . getResult ( ) ) |
testGroupNullPath ( ) { "<AssertPlaceHolder>" ; } createAuthorizable ( boolean , java . lang . String ) { java . lang . String id = java . util . UUID . randomUUID ( ) . toString ( ) ; if ( createGroup ) { return getUserManager ( root ) . createGroup ( id , new org . apache . jackrabbit . oak . spi . security . princip... | org . junit . Assert . assertNotNull ( createAuthorizable ( true , null ) ) |
assume_passed_and_correct_test ( ) { org . junit . Assume . assumeThat ( true , is ( true ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( true , is ( equalTo ( true ) ) ) |
shouldRaiseNoConstraintViolationValidatingNumberOfCDsPropertyValue ( ) { java . util . Set < org . agoncal . book . javaee7 . chapter03 . ex21 . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . ex21 . CD21 > > violations = org . agoncal . book . javaee7 . chapter03 . ex21 . CD21Test . validator . vali... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
constructsDeleteQueryCorrectly ( ) { org . springframework . data . mongodb . repository . query . ReactiveStringBasedMongoQuery mongoQuery = createQueryForMethod ( "removeByLastname" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } isDeleteQuery ( ) { return isDeleteQuery ; } | org . junit . Assert . assertThat ( mongoQuery . isDeleteQuery ( ) , is ( true ) ) |
filterFreshNot ( ) { org . spincast . core . request . Form form = getFormFactory ( ) . createForm ( "myFormName" , null ) ; org . spincast . core . json . JsonObject model = getJsonManager ( ) . create ( ) ; org . spincast . core . json . JsonObject validationElement = getJsonManager ( ) . create ( ) ; model . set ( g... | org . junit . Assert . assertEquals ( "" , html ) |
testGetExpirationFromMessageAbsoluteExpirationOVerrideTTL ( ) { final java . util . Date expirationTime = new java . util . Date ( java . lang . System . currentTimeMillis ( ) ) ; final long ttl = 100000 ; org . apache . qpid . proton . message . impl . MessageImpl protonMessage = ( ( org . apache . qpid . proton . mes... | org . junit . Assert . assertEquals ( expirationTime . getTime ( ) , decoded . getExpiration ( ) ) |
testLogGammaPrecondition2 ( ) { "<AssertPlaceHolder>" ; } logGamma ( double ) { double ret ; if ( ( java . lang . Double . isNaN ( x ) ) || ( x <= 0.0 ) ) { ret = Double . NaN ; } else if ( x < 0.5 ) { return ( org . hipparchus . special . Gamma . logGamma1p ( x ) ) - ( org . hipparchus . util . FastMath . log ( x ) ) ... | org . junit . Assert . assertTrue ( java . lang . Double . isNaN ( org . hipparchus . special . Gamma . logGamma ( ( - 1.0 ) ) ) ) |
testInternedString3 ( ) { java . lang . String s = ( new java . lang . String ( "1" ) ) + ( new java . lang . String ( "1" ) ) ; java . lang . String s2 = "11" ; s . intern ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( ( s2 == s ) , org . hamcrest . Matchers . is ( false ) ) |
ctrFloat ( ) { float [ ] [ ] input = new float [ ] [ ] { new float [ ] { 1 , 2 , 3 } , new float [ ] { 4 , 5 , 6 } } ; org . smurn . jsift . Image target = new org . smurn . jsift . Image ( input ) ; "<AssertPlaceHolder>" ; } toArray ( ) { return toArray ( true ) ; } | org . junit . Assert . assertArrayEquals ( input , target . toArray ( ) ) |
getLabel_labelWithoutStateDescription ( ) { java . lang . String testLabel = "Label" ; when ( widget . getLabel ( ) ) . thenReturn ( testLabel ) ; when ( item . getStateDescription ( ) ) . thenReturn ( null ) ; when ( item . getState ( ) ) . thenReturn ( new org . eclipse . smarthome . core . library . types . StringTy... | org . junit . Assert . assertEquals ( "Label" , label ) |
testIsFirstPage_First ( ) { java . util . List < java . lang . String > mockedList = new java . util . ArrayList < java . lang . String > ( ) ; page = new org . springframework . data . domain . PageImpl < java . lang . String > ( mockedList ) ; org . terasoluna . gfw . web . pagination . PaginationInfo info = new org ... | org . junit . Assert . assertTrue ( result ) |
testTopic ( ) { org . skyscreamer . nevado . jms . destination . NevadoTopic topic = new org . skyscreamer . nevado . jms . destination . NevadoTopic ( "testTopic" ) ; javax . naming . Context ctx = getContext ( ) ; ctx . bind ( "testTopic" , topic ) ; org . skyscreamer . nevado . jms . resource . Topic testTopic = ( (... | org . junit . Assert . assertEquals ( topic , testTopic ) |
testEncryptFlowMessageText ( ) { java . lang . String searchKey = "testEncryptFlowMessageText" ; org . openehealth . ipf . commons . flow . domain . Flow flow = createFlowWithText ( searchKey ) ; flowRepository . persist ( flow ) ; testTransactionManager . commitTransaction ( ) ; testTransactionManager . beginTransacti... | org . junit . Assert . assertFalse ( text . equals ( crypt ) ) |
givenTestClassWithoutBeforeClassAnnotatedMethods_returnsNextStatement ( ) { when ( testClass . getAnnotatedMethods ( org . junit . BeforeClass . class ) ) . thenReturn ( Collections . EMPTY_LIST ) ; org . junit . runners . model . Statement statement = builder . createStatement ( testClass , next , description , notifi... | org . junit . Assert . assertThat ( statement , is ( equalTo ( next ) ) ) |
factory_of_TaiInstant ( ) { for ( int i = - 1000 ; i < 1000 ; i ++ ) { for ( int j = 0 ; j < 10 ; j ++ ) { org . threeten . extra . scale . UtcInstant expected = org . threeten . extra . scale . UtcInstant . ofModifiedJulianDay ( ( 36204 + i ) , ( ( j * ( org . threeten . extra . scale . TestUtcInstant . NANOS_PER_SEC ... | org . junit . Assert . assertEquals ( expected , org . threeten . extra . scale . UtcInstant . of ( tai ) ) |
isManyToOne_return_false_if_has_multiple_incoming_and_multiple_zero_transition ( ) { flowNodeTransitionsWrapper . setInputTransitionsSize ( 12 ) ; flowNodeTransitionsWrapper . setAllOutgoingTransitionDefinitions ( java . util . Arrays . < org . bonitasoft . engine . core . process . definition . model . STransitionDefi... | org . junit . Assert . assertFalse ( flowNodeTransitionsWrapper . isManyToOne ( ) ) |
test_deserialize_string_array ( ) { java . lang . String input = "[{\"name\":\"Aidan\",\"_id\":1,\"age\":22}," + "{\"name\":\"Nina\",\"_id\":2,\"age\":22}]" ; com . afollestad . ason . AsonSerializeTest . Person [ ] object = com . afollestad . ason . Ason . deserialize ( input , com . afollestad . ason . AsonSerializeT... | org . junit . Assert . assertEquals ( object . length , 2 ) |
testFourPartitions ( ) { java . lang . String objectType = "simple" ; java . lang . String index1Value = "value1" ; java . lang . String index2Value = "value2" ; java . lang . String savepointDirectoryName = "savepoint-test-dir" ; java . io . File savepointDirectory = new java . io . File ( savepointDirectoryName ) ; i... | org . junit . Assert . assertEquals ( valueCount , totalCount ) |
equals_should_return_false_on_different_menus_with_different_content ( ) { org . bonitasoft . engine . business . application . xml . ApplicationMenuNode menu1 = org . bonitasoft . engine . business . application . xml . ApplicationNodeBuilder . newMenu ( "Menu" , "Page" ) . havingMenu ( org . bonitasoft . engine . bus... | org . junit . Assert . assertFalse ( menu1 . equals ( menu2 ) ) |
testEquals ( ) { org . jfree . data . category . DefaultCategoryDataset underlying = new org . jfree . data . category . DefaultCategoryDataset ( ) ; underlying . addValue ( 1.1 , "R1" , "C1" ) ; underlying . addValue ( 2.2 , "R1" , "C2" ) ; org . jfree . data . category . CategoryToPieDataset d1 = new org . jfree . da... | org . junit . Assert . assertEquals ( d1 , d2 ) |
testCompletenessOfSpecifiedWorkflows ( ) { org . apache . taverna . scufl2 . validation . correctness . DummyWorkflowBundle dwb = new org . apache . taverna . scufl2 . validation . correctness . DummyWorkflowBundle ( ) ; dwb . setWorkflows ( new org . apache . taverna . scufl2 . api . common . NamedSet < org . apache .... | org . junit . Assert . assertFalse ( problem ) |
toJavaUriWithSpecialChars ( ) { java . net . URI javaUri = java . net . URI . create ( "http://example.org/foo/bar/baz?blah=bl%25ah#boo" ) ; org . apache . shindig . common . uri . Uri uri = org . apache . shindig . common . uri . Uri . parse ( "http://example.org/foo/bar/baz?blah=bl%25ah#boo" ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( javaUri , uri . toJavaUri ( ) ) |
testWriteMetricsWithCommittedUnSupported ( ) { org . apache . beam . sdk . metrics . MetricQueryResults metricQueryResults = new org . apache . beam . runners . extensions . metrics . CustomMetricQueryResults ( false ) ; org . apache . beam . sdk . metrics . MetricsOptions pipelineOptions = org . apache . beam . sdk . ... | org . junit . Assert . assertTrue ( join . matches ( regexpr ) ) |
testGetICCProfileOnImageWithSingleChunkProfile ( ) { java . nio . file . Path file = edu . illinois . library . cantaloupe . test . TestUtil . getImage ( "jpg-icc.jpg" ) ; try ( javax . imageio . stream . ImageInputStream is = javax . imageio . ImageIO . createImageInputStream ( new java . io . BufferedInputStream ( ja... | org . junit . Assert . assertNotNull ( instance . getICCProfile ( ) ) |
testRevisitSubProcessItemDefs ( ) { final java . util . List < org . eclipse . bpmn2 . RootElement > rootElementList = new java . util . ArrayList ( 0 ) ; final org . eclipse . bpmn2 . Definitions definitions = mock ( org . eclipse . bpmn2 . Definitions . class ) ; when ( definitions . getRootElements ( ) ) . thenRetur... | org . junit . Assert . assertTrue ( rootElementList . isEmpty ( ) ) |
testSerializeEmtpyServerEntry ( ) { org . apache . directory . api . ldap . model . entry . Entry entry = new org . apache . directory . api . ldap . model . entry . DefaultEntry ( org . apache . directory . server . core . partition . impl . btree . jdbm . ServerEntrySerializerTest . schemaManager ) ; org . apache . d... | org . junit . Assert . assertEquals ( entry , result ) |
geeftPredikaatUitAllPredikaatAlsTypeMatcht ( ) { final nl . bzk . brp . model . hisvolledig . predikaat . HistorieVanafPredikaat predikaat = view . getPredikaatVanType ( nl . bzk . brp . model . hisvolledig . predikaat . HistorieVanafPredikaat . class ) ; "<AssertPlaceHolder>" ; } getPredikaatVanType ( java . lang . Cl... | org . junit . Assert . assertThat ( predikaat , org . hamcrest . CoreMatchers . is ( predikaat ) ) |
condition15Test ( ) { analyze . labeling . Label label = analyze . labeling . LabelFactory . getInstance ( ) . getNewLabel ( "hoi5" ) ; analyze . labeling . Label label1 = analyze . labeling . LabelFactory . getInstance ( ) . getNewLabel ( "doei" ) ; model . Record record = new model . Record ( null ) ; record . addLab... | org . junit . Assert . assertEquals ( true , condition . evaluateWithRecord ( record ) ) |
testIsParseResult ( ) { System . out . println ( "isParseResult" ) ; boolean expResult = false ; boolean result = instance . isParseResult ( ) ; "<AssertPlaceHolder>" ; } isParseResult ( ) { return getPropertyAsBoolean ( kg . apc . jmeter . samplers . HTTPRawSampler . PARSE ) ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testGetHandler_failsWithUnknownId ( ) { org . eclipse . rap . rwt . testfixture . internal . TestRequest request = org . eclipse . rap . rwt . testfixture . internal . Fixture . fakeNewGetRequest ( ) ; request . setParameter ( ServiceManagerImpl . REQUEST_PARAM , "id" ) ; try { serviceManager . getHandler ( ) ; org . j... | org . junit . Assert . assertTrue ( expected . getMessage ( ) . contains ( "id" ) ) |
itCopiesInheritedPropertiesToo ( ) { org . libreplan . business . util . deepcopy . EntityExamples . SubClassExample subClassExample = new org . libreplan . business . util . deepcopy . EntityExamples . SubClassExample ( ) ; subClassExample . setSuperClassStringProperty ( "foo" ) ; org . libreplan . business . util . d... | org . junit . Assert . assertThat ( copy . getSuperClassStringProperty ( ) , org . hamcrest . CoreMatchers . equalTo ( "foo" ) ) |
testMatchesWithNullConfiguratorReference ( ) { matcher = new org . eclipse . rap . rwt . osgi . internal . Matcher ( httpServiceReference , null ) ; boolean matches = matcher . matches ( ) ; "<AssertPlaceHolder>" ; } matches ( ) { return ( matchesHttpService ( ) ) && ( matchesConfigurator ( ) ) ; } | org . junit . Assert . assertFalse ( matches ) |
shouldUseConfiguredRequestHandler ( ) { final java . util . Properties configProperties = new java . util . Properties ( ) ; configProperties . setProperty ( ConfigurableCacheStrategy . KEY , MemoryCacheStrategy . ALIAS ) ; victim . setConfigProperties ( configProperties ) ; final ro . isdc . wro . cache . CacheStrateg... | org . junit . Assert . assertEquals ( ro . isdc . wro . cache . impl . MemoryCacheStrategy . class , actual . getClass ( ) ) |
testJdkDependencies ( ) { java . util . ArrayList < java . io . File > jars = new java . util . ArrayList < java . io . File > ( 1 ) ; org . eclipse . ceylon . compiler . java . runtime . Main . ClassPath classPath = new org . eclipse . ceylon . compiler . java . runtime . Main . ClassPath ( jars ) ; org . eclipse . ce... | org . junit . Assert . assertNotNull ( module ) |
testSetupWithComponentColorModel ( ) { java . awt . image . ComponentColorModel cm = mock ( java . awt . image . ComponentColorModel . class ) ; org . apache . xmlgraphics . image . loader . impl . ImageRawPNG irpng = mock ( org . apache . xmlgraphics . image . loader . impl . ImageRawPNG . class ) ; org . apache . fop... | org . junit . Assert . assertEquals ( 3 , filter . getColors ( ) ) |
getConnectionPropertyFromKey ( ) { java . lang . String prefixedConnectionProperty = "org.apache.crunch.kafka.connection.properties.some.property" ; java . lang . String actual = org . apache . crunch . kafka . inputformat . KafkaInputFormat . getConnectionPropertyFromKey ( prefixedConnectionProperty ) ; java . lang . ... | org . junit . Assert . assertThat ( expected , org . hamcrest . core . Is . is ( actual ) ) |
preProcessorDoesNotDeny ( ) { org . alfresco . service . cmr . repository . NodeRef nodeRef = generateCmContent ( "anyname" ) ; java . lang . String perm = org . alfresco . module . org_alfresco_module_rm . test . util . AlfMock . generateText ( ) ; when ( mockedPermissionProcessorRegistry . getPermissionPreProcessors ... | org . junit . Assert . assertEquals ( AccessStatus . UNDETERMINED , result ) |
complementIfOverlap1 ( ) { net . time4j . range . IntervalCollection < net . time4j . PlainDate > coll = net . time4j . range . IntervalCollection . onDateAxis ( ) . plus ( net . time4j . range . DateInterval . parseISO ( "2011-01-01/2013-12-31" ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2014-06-30/... | org . junit . Assert . assertThat ( coll . withComplement ( window ) , org . hamcrest . CoreMatchers . is ( expected ) ) |
validateByteArraySerialization ( ) { byte [ ] value = new byte [ 1024 ] ; org . apache . directmemory . serialization . StandardSerializerTest . r . nextBytes ( value ) ; byte [ ] payload = org . apache . directmemory . serialization . StandardSerializerTest . serializer . serialize ( value ) ; byte [ ] res = org . apa... | org . junit . Assert . assertArrayEquals ( value , res ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . SubteamMembersChangedEvent event = new com . github . seratch . jslack . api . model . event . SubteamMembersChangedEvent ( ) ; ... | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
generics_wildcard_lower_bound ( ) { final java . lang . Object clas = bsh . TestUtil . eval ( "checkList(List<?<sp>super<sp>Integer><sp>list)<sp>{" , "list.size()<sp><<sp>2;" , "}" , "List<Integer><sp>l<sp>=<sp>new<sp>ArrayList<>();" , "l.add(1);" , "checkList(l);" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return tes... | org . junit . Assert . assertTrue ( clas . getClass ( ) . getName ( ) , ( ( java . lang . Boolean ) ( clas ) ) ) |
serviceShouldBeDeclared ( ) { try ( org . nuxeo . automation . scripting . api . AutomationScriptingService . Session ref = pool . get ( session ) ) { try ( java . io . InputStream stream = this . getClass ( ) . getResourceAsStream ( "/checkWrapper.js" ) ) { "<AssertPlaceHolder>" ; ref . run ( stream ) ; } } } getResou... | org . junit . Assert . assertNotNull ( stream ) |
testNextGreaterElements ( ) { com . javapractice . leetcode . NextGreaterElementII test = new com . javapractice . leetcode . NextGreaterElementII ( ) ; int [ ] input = new int [ ] { 1 , 2 , 1 } ; int [ ] expected = new int [ ] { 2 , - 1 , 2 } ; "<AssertPlaceHolder>" ; } nextGreaterElements ( int [ ] ) { int [ ] array ... | org . junit . Assert . assertArrayEquals ( test . nextGreaterElements ( input ) , expected ) |
testGetBusinessObjectDefinitionSubjectMatterExpertsByBusinessObjectDefinitionUpperCaseParameters ( ) { businessObjectDefinitionSubjectMatterExpertDaoTestHelper . createBusinessObjectDefinitionSubjectMatterExpertEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKey ( BDEF_N... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKeys ( java . util . Arrays . asList ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKey ( BDEF_NAMESPACE , BDEF_NAME , USER_ID ) , new org . finra . he... |
testGetUniqueInstance_applicationContext_returnsSameInstanceInSameScope ( ) { org . eclipse . rap . rwt . service . ApplicationContext applicationContext = mockApplicationContextWithAttributeStore ( ) ; org . eclipse . rap . rwt . internal . SingletonManager . install ( applicationContext ) ; java . lang . Object insta... | org . junit . Assert . assertSame ( instance1 , instance2 ) |
shouldDispatchEndpointsOnRequest ( ) { com . couchbase . client . core . endpoint . Endpoint e1 = mock ( com . couchbase . client . core . endpoint . Endpoint . class ) ; com . couchbase . client . core . service . AbstractPoolingServiceTest . EndpointStates e1s = new com . couchbase . client . core . service . Abstrac... | org . junit . Assert . assertEquals ( endpoints , foundEndpoints . get ( ) . size ( ) ) |
testShouldFireSyncEvent ( ) { java . util . concurrent . atomic . AtomicInteger counter = com . liferay . document . library . app . service . test . DLAppServiceTestUtil . registerDLSyncEventProcessorMessageListener ( DLSyncConstants . EVENT_UPDATE ) ; com . liferay . portal . kernel . service . ServiceContext service... | org . junit . Assert . assertEquals ( 1 , counter . get ( ) ) |
shouldTestResultsAcrossMultipleIndices ( ) { java . lang . String documentId1 = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity1 = org . springframework . data . elasticsearch . entities . SampleEntity . builder ( ) . id ( documentId1 ) . message ( "some<sp>mess... | org . junit . Assert . assertThat ( sampleEntities . size ( ) , is ( equalTo ( 2 ) ) ) |
setReplicaSelector ( ) { java . util . Map < java . lang . String , java . lang . String > exp = new java . util . HashMap ( ) ; exp . put ( "foo" , "bar" ) ; com . openshift . internal . restclient . model . v1 . ReplicationControllerTest . rc . setReplicaSelector ( exp ) ; "<AssertPlaceHolder>" ; } getReplicaSelector... | org . junit . Assert . assertEquals ( exp , com . openshift . internal . restclient . model . v1 . ReplicationControllerTest . rc . getReplicaSelector ( ) ) |
testUpdateSubnetWithUpdatingOperation ( ) { mockOpenstackNetworkAdminService . updateSubnet ( anyObject ( ) ) ; replay ( mockOpenstackNetworkAdminService ) ; final javax . ws . rs . client . WebTarget wt = target ( ) ; java . io . InputStream jsonStream = org . onosproject . openstacknetworking . web . OpenstackSubnetW... | org . junit . Assert . assertThat ( status , org . hamcrest . Matchers . is ( 200 ) ) |
testLeaf ( ) { final org . opendaylight . yangtools . yang . data . api . schema . LeafNode < ? > data = org . mockito . Mockito . mock ( org . opendaylight . yangtools . yang . data . api . schema . LeafNode . class ) ; final org . opendaylight . yangtools . yang . data . api . schema . tree . spi . Version version = ... | org . junit . Assert . assertTrue ( ( node instanceof org . opendaylight . yangtools . yang . data . api . schema . tree . spi . ValueNode ) ) |
shouldReturnFalseWhenOrderDoesNotHaveTechnology ( ) { given ( operationalTask . getBelongsToField ( OperationalTaskFieldsOTFO . ORDER ) ) . willReturn ( order ) ; given ( order . getBelongsToField ( OrderFields . TECHNOLOGY ) ) . willReturn ( null ) ; boolean result = operationalTaskValidatorsOTFO . validatesWith ( ope... | org . junit . Assert . assertFalse ( result ) |
testDurationType ( ) { java . time . temporal . TemporalAmount duration = org . neo4j . values . storable . DurationValue . duration ( 57 , 57 , 57 , 57 ) . asObjectCopy ( ) ; java . lang . String key = "dt" ; node1 . setProperty ( key , duration ) ; newTransaction ( ) ; java . lang . Object property = node1 . getPrope... | org . junit . Assert . assertEquals ( duration , property ) |
testAddPrefixAndSuffix ( ) { final java . lang . String expected = "duration(\"P1Y2M\")" ; final java . lang . String input = "1Y2M" ; final java . lang . String actual = converter . addPrefixAndSuffix ( input ) ; "<AssertPlaceHolder>" ; } addPrefixAndSuffix ( java . lang . String ) { return ( ( org . kie . workbench .... | org . junit . Assert . assertEquals ( expected , actual ) |
testUUID ( ) { final java . lang . String uuid = "uuid1" ; tested . setUUID ( uuid ) ; "<AssertPlaceHolder>" ; } getUUID ( ) { return uuid ; } | org . junit . Assert . assertEquals ( uuid , tested . getUUID ( ) ) |
test_PUT_password_ok ( ) { org . apache . usergrid . rest . applications . collection . users . Entity entity = usersResource . post ( new org . apache . usergrid . rest . applications . collection . users . User ( "edanuff" , "edanuff" , "edanuff@email.com" , "sesame" ) ) ; waitForQueueDrainAndRefreshIndex ( ) ; users... | org . junit . Assert . assertNotNull ( changeResponse ) |
makeDirectoryTestCallHostPlugingReturningNull ( ) { boolean makeDirectoryReturn = configureAndExecuteMakeDirectoryMethodForTest ( pathMock , null ) ; "<AssertPlaceHolder>" ; } configureAndExecuteMakeDirectoryMethodForTest ( java . lang . String , java . lang . String ) { org . mockito . Mockito . when ( citrixResourceB... | org . junit . Assert . assertFalse ( makeDirectoryReturn ) |
testNameCoverageSubdomainNoWildcard ( ) { final java . lang . String name = "xmpp.example.org" ; final java . lang . String pattern = "example.org" ; final boolean result = org . jivesoftware . openfire . net . DNSUtil . isNameCoveredByPattern ( name , pattern ) ; "<AssertPlaceHolder>" ; } isNameCoveredByPattern ( java... | org . junit . Assert . assertFalse ( result ) |
testGetIntBEPlainJava ( ) { for ( int i = 0 ; i < ( ( bytes . length ) - 3 ) ; i ++ ) { int expected = byteBufferBE . getInt ( i ) ; int value = primitiveArrayUtilsSafe . getIntBE ( bytes , i ) ; "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertEquals ( expected , value ) |
doNotRemoveCastsFromPrimitiveDeclarations ( ) { "<AssertPlaceHolder>" ; } doNotRemoveCastsFromPrimitiveDeclarations ( ) { org . junit . Assert . assertEquals ( sampleIn . doNotRemoveCastsFromPrimitiveDeclarations ( ) , sampleOut . doNotRemoveCastsFromPrimitiveDeclarations ( ) ) ; } | org . junit . Assert . assertEquals ( sampleIn . doNotRemoveCastsFromPrimitiveDeclarations ( ) , sampleOut . doNotRemoveCastsFromPrimitiveDeclarations ( ) ) |
deveObterNFNotaInfoSituacaoTributariaIPIComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoIPINT itemImpostoIPINT = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoIPINT ( ) ; final com . fincatto . documentofiscal . nfe310 .... | org . junit . Assert . assertEquals ( entradaIsenta , itemImpostoIPINT . getSituacaoTributariaIPI ( ) ) |
testWriteStringByFileName ( ) { com . igumnov . common . File . writeString ( "123\n123" , "tmp/testWriteStringByFileName.txt" ) ; "<AssertPlaceHolder>" ; } readAllToString ( java . lang . String ) { java . io . File file = new java . io . File ( fileName ) ; com . igumnov . common . FileInputStream fis = new com . igu... | org . junit . Assert . assertEquals ( com . igumnov . common . File . readAllToString ( "tmp/testWriteStringByFileName.txt" ) , "123\n123" ) |
testIsJDK6OrHigher_1 ( ) { boolean result = org . audit4j . core . util . EnvUtil . isJDK6OrHigher ( ) ; "<AssertPlaceHolder>" ; } isJDK6OrHigher ( ) { return org . audit4j . core . util . EnvUtil . isJDK_N_OrHigher ( 6 ) ; } | org . junit . Assert . assertEquals ( true , result ) |
testBlockingForEachWhenError ( ) { try { io . reactivex . Flowable . error ( new java . lang . RuntimeException ( "boo" ) ) . blockingForEach ( System . out :: println ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertEquals ( "boo" , e . getMessage ( ) ) |
testRenameNoMatch ( ) { org . gradle . api . internal . file . copy . RegExpNameMapper mapper = new org . gradle . api . internal . file . copy . RegExpNameMapper ( "(.+).java" , "$1Test.java" ) ; java . lang . String noMatch = "NoMatch" ; "<AssertPlaceHolder>" ; } transform ( org . gradle . nativeplatform . NativeDepe... | org . junit . Assert . assertEquals ( noMatch , mapper . transform ( noMatch ) ) |
testResolvePackageWithMainPath ( ) { final javax . enterprise . inject . spi . Bean moduleServiceBean = ( ( javax . enterprise . inject . spi . Bean ) ( beanManager . getBeans ( org . kie . workbench . common . services . shared . project . KieModuleService . class ) . iterator ( ) . next ( ) ) ) ; final javax . enterp... | org . junit . Assert . assertNull ( result ) |
shouldReturnNoValuesIfStartIsBiggerThanSize ( ) { final java . util . List < java . lang . Integer > values = java . util . Arrays . asList ( 0 , 1 , 2 , 3 ) ; final int start = 5 ; final int end = Integer . MAX_VALUE ; final uk . gov . gchq . gaffer . commonutil . iterable . CloseableIterable < java . lang . Integer >... | org . junit . Assert . assertTrue ( com . google . common . collect . Lists . newArrayList ( limitedValues ) . isEmpty ( ) ) |
countVariablesInRuleWithListAssigns ( ) { ws . prova . kernel2 . ProvaKnowledgeBase kb = new ws . prova . reference2 . ProvaKnowledgeBaseImpl ( ) ; ws . prova . kernel2 . ProvaVariable v1 = ws . prova . reference2 . ProvaVariableImpl . create ( "v1" ) ; ws . prova . kernel2 . ProvaVariable v2 = ws . prova . reference2 ... | org . junit . Assert . assertEquals ( r1 . getVariables ( ) . size ( ) , 4 ) |
testGenerateUniqueID_usesDefaultOnEmpty ( ) { java . lang . String s1 = com . onelogin . saml2 . util . Util . generateUniqueID ( "" ) ; "<AssertPlaceHolder>" ; } generateUniqueID ( java . lang . String ) { if ( ( prefix == null ) || ( org . apache . commons . lang3 . StringUtils . isEmpty ( prefix ) ) ) { prefix = com... | org . junit . Assert . assertThat ( s1 , org . hamcrest . CoreMatchers . startsWith ( Util . UNIQUE_ID_PREFIX ) ) |
add_string_enablesChaining ( ) { "<AssertPlaceHolder>" ; } add ( org . eclipse . ui . internal . cheatsheets . registry . CheatSheetCollectionElement ) { childCollections . add ( newElement ) ; } | org . junit . Assert . assertSame ( array , array . add ( "foo" ) ) |
shouldGetCorrectMetadata ( ) { org . arquillian . cube . spi . Cube < ? > cube = new org . arquillian . cube . impl . client . CubeMetadataTest . TestCube ( ) ; cube . addMetadata ( org . arquillian . cube . impl . client . CubeMetadataTest . TestMetadata . class , new org . arquillian . cube . impl . client . CubeMeta... | org . junit . Assert . assertTrue ( ( metadata instanceof org . arquillian . cube . impl . client . CubeMetadataTest . TestMetadataImpl ) ) |
shouldNotAcceptLuceneFileFromFusionProvider ( ) { java . io . File dir = subProviderDirectoryStructure ( storeDir , files . NativeIndexFileFilterTest . LUCENE_DESCRTIPTOR ) . forProvider ( files . NativeIndexFileFilterTest . LUCENE_DESCRTIPTOR ) . directoryForIndex ( 1 ) ; java . io . File file = new java . io . File (... | org . junit . Assert . assertFalse ( accepted ) |
validateAcceptNothingOnNullPatterns ( ) { final org . codehaus . mojo . jaxb2 . shared . filters . pattern . PatternFileFilter unitUnderTest = new org . codehaus . mojo . jaxb2 . shared . filters . pattern . PatternFileFilter ( null , true ) ; unitUnderTest . initialize ( log ) ; final java . util . Map < java . lang .... | org . junit . Assert . assertFalse ( current . getValue ( ) ) |
testCount ( ) { int total = dao . count ( ) ; "<AssertPlaceHolder>" ; } count ( ) { long c = ( ( java . lang . Long ) ( currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . ArrayRun . class ) . setProjection ( org . hibernate . criterion . Projections . rowCount ( ) ) . uniqueResult ( ) )... | org . junit . Assert . assertEquals ( 20 , total ) |
testRoundTripThroughJson ( ) { org . codehaus . jackson . JsonFactory factory = new org . codehaus . jackson . JsonFactory ( ) ; org . codehaus . jackson . map . ObjectMapper mapper = new org . codehaus . jackson . map . ObjectMapper ( factory ) ; Api state = populateBuilder ( createBuilder ( ) ) . build ( ) ; java . l... | org . junit . Assert . assertEquals ( state , newState ) |
testDisbalesActions ( ) { com . eclipsesource . tabris . internal . ui . Controller controller = mock ( com . eclipsesource . tabris . internal . ui . Controller . class ) ; com . eclipsesource . tabris . internal . ui . ActionOperatorImpl actionOperator = new com . eclipsesource . tabris . internal . ui . ActionOperat... | org . junit . Assert . assertFalse ( enabled ) |
testResourceExists ( ) { org . qualipso . factory . client . test . sb . BrowserServiceSBTest . logger . debug ( "testing<sp>resourceExists" ) ; try { javax . security . auth . login . LoginContext lc = new javax . security . auth . login . LoginContext ( "qualipso" , new org . jboss . security . auth . callback . User... | org . junit . Assert . assertTrue ( exists ) |
testCloseInputStream ( ) { com . sap . core . odata . core . ep . util . CircleStreamBuffer csb = new com . sap . core . odata . core . ep . util . CircleStreamBuffer ( ) ; java . io . OutputStream write = csb . getOutputStream ( ) ; write . write ( "Test" . getBytes ( ) , 0 , 4 ) ; java . io . InputStream inStream = c... | org . junit . Assert . assertEquals ( 4 , count ) |
testMerge ( ) { org . apache . metron . statistics . sampling . UniformSampler sampler = new org . apache . metron . statistics . sampling . UniformSampler ( 10 ) ; java . lang . Iterable < org . apache . metron . statistics . sampling . Sampler > subsamples = getSubsamples ( org . apache . metron . statistics . sampli... | org . junit . Assert . assertEquals ( s . getSize ( ) , 10 ) |
testContradictoryExistingSchema ( ) { com . github . anno4j . Anno4j anno4j = new com . github . anno4j . Anno4j ( ) ; com . github . anno4j . Transaction setupTransaction = anno4j . createTransaction ( ) ; setupTransaction . begin ( ) ; setupTransaction . getConnection ( ) . prepareUpdate ( ( "INSERT<sp>DATA<sp>{" + (... | org . junit . Assert . assertTrue ( exceptionThrown ) |
testLocalDateTimeType ( ) { java . time . LocalDateTime dateTime = org . neo4j . values . storable . LocalDateTimeValue . localDateTime ( 1991 , 1 , 1 , 0 , 0 , 13 , 37 ) . asObjectCopy ( ) ; java . lang . String key = "dt" ; node1 . setProperty ( key , dateTime ) ; newTransaction ( ) ; java . lang . Object property = ... | org . junit . Assert . assertEquals ( dateTime , property ) |
testCSVSerializeTwoTables ( ) { java . lang . String expectedCsv = technology . tabula . UtilsForTesting . loadCsv ( "src/test/resources/technology/tabula/csv/twotables.csv" ) ; java . util . List < technology . tabula . Table > tables = this . getTables ( ) ; java . lang . StringBuilder sb = new java . lang . StringBu... | org . junit . Assert . assertEquals ( expectedCsv , s ) |
testJarWithManifestInDirWithSpace ( ) { java . lang . String mainjarstring = buildRule . getProject ( ) . getProperty ( "main.jar" ) ; java . lang . String extjarstring = buildRule . getProject ( ) . getProperty ( "ext.jar" ) ; org . apache . tools . ant . types . Path myPath = new org . apache . tools . ant . types . ... | org . junit . Assert . assertEquals ( ( ( mainjarstring + ( java . io . File . pathSeparator ) ) + extjarstring ) , path ) |
symlink_lost ( ) { java . io . File f1 = touch ( "a/file1" , 50 ) ; java . io . File f2 = touch ( "b/file2" , 50 ) ; link ( "c/link" , f1 , 50 ) ; org . junit . Assume . assumeThat ( f1 . delete ( ) , is ( true ) ) ; com . asakusafw . operation . tools . hadoop . fs . Clean c = createService ( 100 ) ; c . run ( args ( ... | org . junit . Assert . assertThat ( f2 . toString ( ) , f2 . exists ( ) , is ( false ) ) |
testNestedElementsIteration ( ) { org . petitparser . parser . Parser parser3 = lowerCase ( ) ; org . petitparser . parser . Parser parser2 = parser3 . star ( ) ; org . petitparser . parser . Parser parser1 = parser2 . flatten ( ) ; org . petitparser . utils . Mirror mirror = org . petitparser . utils . Mirror . of ( p... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( parser1 , parser2 , parser3 ) , parsers ) |
getUserSecurityNameWithValidUser ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String securityName = "cn=vmmtestuser,o=ibm,c=us" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSFailover . c , "getUserSecurityNameWithValidUser... | org . junit . Assert . assertEquals ( securityName , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSFailover . servlet . getUserSecurityName ( user ) ) |
testDateToStr_20120512 ( ) { java . lang . String expected = "2012/05/12" ; java . util . Calendar cal = new java . util . GregorianCalendar ( 2012 , 4 , 12 ) ; java . util . Date fixture = cal . getTime ( ) ; java . lang . String actual = info . michaelkohler . helpertools . date . DateFormatHelper . dateToStr ( fixtu... | org . junit . Assert . assertTrue ( actual . equals ( expected ) ) |
testSetPercentageIllegal ( ) { org . libreplan . business . orders . entities . OrderLine orderLine = org . libreplan . business . orders . entities . OrderLine . create ( ) ; org . libreplan . business . orders . entities . HoursGroup hoursGroup = org . libreplan . business . orders . entities . HoursGroup . create ( ... | org . junit . Assert . assertThat ( orderLine . getWorkHours ( ) , org . hamcrest . CoreMatchers . equalTo ( 200 ) ) |
testDoesLspDbMatchNegative ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . pcep . types . rev181109 . open . object . open . Tlvs localTlvs = org . opendaylight . bgpcep . pcep . topology . provider . SyncOptimizationTest . createTlvs ( 1L , false , false ) ; final org... | org . junit . Assert . assertFalse ( syncOpt . doesLspDbMatch ( ) ) |
testConvert ( ) { java . lang . Long id = 1L ; java . lang . String name = "name" ; java . lang . String abbrName = "abbrName" ; org . lnu . is . resource . family . type . FamilyTypeResource source = new org . lnu . is . resource . family . type . FamilyTypeResource ( ) ; source . setAbbrName ( abbrName ) ; source . s... | org . junit . Assert . assertEquals ( expected , actual ) |
testFilterGbaSystematiekStandaard ( ) { final nl . bzk . brp . domain . internbericht . selectie . SelectieVerwerkTaakBericht selectieTaak = new nl . bzk . brp . domain . internbericht . selectie . SelectieVerwerkTaakBericht ( ) ; final int selectieRunId = 1 ; selectieTaak . setSelectieRunId ( selectieRunId ) ; final j... | org . junit . Assert . assertTrue ( ( ( selectieTaakResultaat . getOngeldigeTaken ( ) . size ( ) ) == 1 ) ) |
testWithNull ( ) { final boolean [ ] nextCalled = new boolean [ 1 ] ; greycat . Tasks . newTask ( ) . then ( inject ( "node" ) ) . then ( defineAsGlobalVar ( "nodeName" ) ) . thenDo ( new greycat . ActionFunction ( ) { @ greycatTest . internal . task . Override public void eval ( greycat . TaskContext ctx ) { ctx . con... | org . junit . Assert . assertTrue ( nextCalled [ 0 ] ) |
testSpecificExceptionRetry ( ) { for ( int x = 1 ; x <= 10 ; x ++ ) { final int attemptsBeforeSuccess = x ; final java . util . concurrent . atomic . AtomicInteger attempts = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; org . springframework . retry . RetryCallback < java . lang . String , java . lang ... | org . junit . Assert . assertEquals ( x , attempts . get ( ) ) |
testWriteLines_4arg_nullSeparator ( ) { final java . lang . Object [ ] data = new java . lang . Object [ ] { "hello" , new java . lang . StringBuffer ( "world" ) , "" , "this<sp>is" , null , "some<sp>text" } ; final java . util . List < java . lang . Object > list = java . util . Arrays . asList ( data ) ; final java .... | org . junit . Assert . assertEquals ( expected , actual ) |
testEncrypt_Even ( ) { org . apache . cayenne . crypto . transformer . bytes . BytesEncryptor instance = org . apache . cayenne . crypto . unit . SwapBytesTransformer . encryptor ( ) ; byte [ ] input = new byte [ ] { 1 , 3 , 5 , 8 } ; byte [ ] output = instance . encrypt ( input , 3 , new byte [ 1 ] ) ; "<AssertPlaceHo... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 0 , 0 , 0 , 8 , 5 , 3 , 1 } , output ) |
testCustoms ( ) { org . ff4j . cassandra . CassandraConnection cc = new org . ff4j . cassandra . CassandraConnection ( ) ; org . ff4j . cassandra . store . FeatureStoreCassandra cassandraStore = new org . ff4j . cassandra . store . FeatureStoreCassandra ( ) ; cassandraStore . setConn ( cc ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertNotNull ( cassandraStore . getConn ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.