input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testEquals ( ) { ast . Variable reference = new ast . Variable ( "x" ) ; ast . Variable toTest = new ast . Variable ( "x" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( reference , toTest ) |
testDontSleepIfHasMoreData ( ) { int DEFAULT_SAMPLE_PERIOD_MS = 1000 * 2 ; org . apache . hadoop . chukwa . conf . ChukwaConfiguration cc = new org . apache . hadoop . chukwa . conf . ChukwaConfiguration ( ) ; cc . setInt ( "chukwaAgent.fileTailingAdaptor.maxReadSize" , 18 ) ; agent = org . apache . hadoop . chukwa . d... | org . junit . Assert . assertTrue ( ( ( endTime - startTime ) < DEFAULT_SAMPLE_PERIOD_MS ) ) |
testResize ( ) { canvas . addPaintListener ( new org . eclipse . swt . events . PaintListener ( ) { @ org . eclipse . swt . widgets . Override public void paintControl ( org . eclipse . swt . events . PaintEvent event ) { paintEventLog . add ( event ) ; } } ) ; canvas . setSize ( 100 , 100 ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( 1 , paintEventLog . size ( ) ) |
testDeleteAllTenantTableData ( ) { java . sql . Connection conn = nextConnection ( getUrl ( ) ) ; try { conn . setAutoCommit ( true ) ; conn . createStatement ( ) . executeUpdate ( ( "delete<sp>from<sp>" + ( PARENT_TABLE_NAME ) ) ) ; conn . close ( ) ; conn = nextConnection ( getUrl ( ) ) ; conn . setAutoCommit ( true ... | org . junit . Assert . assertEquals ( 2 , rs . getInt ( 1 ) ) |
testGetNumberOfExecutionSlots ( ) { "<AssertPlaceHolder>" ; } getNumberOfExecutionSlots ( ) { return org . peerbox . app . config . PeerWaspConfig . NUMBER_OF_EXECUTE_SLOTS ; } | org . junit . Assert . assertTrue ( ( ( config . getNumberOfExecutionSlots ( ) ) >= 1 ) ) |
testGetTotalRecords ( ) { System . out . println ( "getTotalRecords" ) ; com . pearson . docussandra . domain . event . IndexCreatedEvent instance = com . pearson . docussandra . testhelper . Fixtures . createTestIndexCreationStatus ( ) ; long expResult = 1000L ; long result = instance . getTotalRecords ( ) ; "<AssertP... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . specoffer . SpecOfferBenefit entity = new org . lnu . is . domain . specoffer . SpecOfferBenefit ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object >... | org . junit . Assert . assertEquals ( expected , actual ) |
testVoerStapUit ( ) { final nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel administratieveHandeling = maakAdministratieveHandelingModel ( ) ; final java . util . List < nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView > personen = java . util . Collectio... | org . junit . Assert . assertThat ( stapResultaat , org . hamcrest . Matchers . is ( true ) ) |
testEncryptNullPassword ( ) { java . lang . String res = service . encrypt ( null ) ; "<AssertPlaceHolder>" ; } encrypt ( java . lang . String ) { try { javax . crypto . Cipher encCipher = javax . crypto . Cipher . getInstance ( secretKey . getAlgorithm ( ) ) ; encCipher . init ( Cipher . ENCRYPT_MODE , secretKey , par... | org . junit . Assert . assertNull ( res ) |
givenDebugDisabled_whenIsEnabled_thenReturnsFalse ( ) { com . brandwatch . robots . util . LogLevel level = LogLevel . DEBUG ; when ( mockLogger . isDebugEnabled ( ) ) . thenReturn ( false ) ; boolean result = level . isEnabled ( mockLogger ) ; "<AssertPlaceHolder>" ; verify ( mockLogger , only ( ) ) . isDebugEnabled (... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testGetIntValue ( ) { final com . allanbank . mongodb . bson . element . LongElement element = new com . allanbank . mongodb . bson . element . LongElement ( "foo" , 1010101 ) ; "<AssertPlaceHolder>" ; } getIntValue ( ) { return ( ( int ) ( myValue ) ) ; } | org . junit . Assert . assertEquals ( 1010101 , element . getIntValue ( ) ) |
testDDMFormRenderingContextLocaleIsThemeDisplayLocale ( ) { com . liferay . dynamic . data . mapping . form . web . internal . display . context . DDMFormDisplayContext ddmFormDisplayContext = createDDMFormDisplayContext ( ) ; java . util . Locale defaultLocale = com . liferay . portal . kernel . util . LocaleUtil . BR... | org . junit . Assert . assertEquals ( LocaleUtil . SPAIN , ddmFormRenderingContext . getLocale ( ) ) |
test_Zero_USDEquals_Negative_Zero_USD ( ) { com . ripple . core . coretypes . Amount a = com . ripple . core . AmountTest . amt ( "0/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL" ) ; com . ripple . core . coretypes . Amount b = com . ripple . core . AmountTest . amt ( "-0/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL" ) ; "<AssertP... | org . junit . Assert . assertTrue ( a . equals ( b ) ) |
textToTextConversion ( ) { java . lang . String source = "All<sp>those<sp>moments<sp>will<sp>be<sp>lost<sp>in<sp>time,<sp>like<sp>tears<sp>in<sp>rain." ; byte [ ] sourceAs8859 = source . getBytes ( org . infinispan . commons . dataconversion . ISO_8859_1 ) ; byte [ ] sourceAsASCII = source . getBytes ( org . infinispan... | org . junit . Assert . assertArrayEquals ( sourceAsASCII , ( ( byte [ ] ) ( result ) ) ) |
assertWaitUntilConnectionReleaseForTransaction ( ) { final java . util . concurrent . atomic . AtomicBoolean flag = new java . util . concurrent . atomic . AtomicBoolean ( true ) ; java . lang . Thread waitThread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . apache . shardingsphere . shardingpro... | org . junit . Assert . assertTrue ( flag . get ( ) ) |
testAMQPSequence ( ) { org . fusesource . amqp . codec . AMQPSequence in = new org . fusesource . amqp . codec . AMQPSequence ( ) ; in . setValue ( new java . util . ArrayList ( ) ) ; in . getValue ( ) . add ( new org . fusesource . amqp . codec . AMQPString ( "Hello<sp>world!" ) ) ; in . getValue ( ) . add ( new org .... | org . junit . Assert . assertEquals ( in . toString ( ) , out . toString ( ) ) |
injectionContextWithEmptyContext ( ) { com . airhacks . afterburner . injection . PresenterWithField withField = com . airhacks . afterburner . injection . Injector . instantiatePresenter ( com . airhacks . afterburner . injection . PresenterWithField . class ) ; "<AssertPlaceHolder>" ; com . airhacks . afterburner . i... | org . junit . Assert . assertNull ( withField . getName ( ) ) |
available_onPartiallyReadStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; org . exist . util . io . CachingFilterInputStream cfis = new org . exist ... | org . junit . Assert . assertEquals ( ( ( testData . length ) - 2 ) , cfis . available ( ) ) |
testDatumIngangVandaagEnDatumEindeInDeToekomst ( ) { nl . bzk . brp . beheer . webapp . validatie . GenericValidator < nl . bzk . algemeenbrp . dal . domein . brp . entity . Partij > partijValidator = new nl . bzk . brp . beheer . webapp . validatie . GenericValidator ( nl . bzk . algemeenbrp . dal . domein . brp . ent... | org . junit . Assert . assertEquals ( 0 , errorCount ( partijValidator , partij ) ) |
testFindBetweenCondition ( ) { java . util . List < org . sculptor . framework . accessapi . ConditionalCriteria > conditionalCriteria = criteriaFor ( org . sculptor . examples . library . media . domain . Movie . class ) . withProperty ( org . sculptor . examples . library . media . domain . MovieProperties . playLeng... | org . junit . Assert . assertEquals ( 2 , found . size ( ) ) |
initEmptyPlatformProtocolMap ( ) { java . util . Set < java . lang . String > platformProtocols = java . util . Collections . emptySet ( ) ; "<AssertPlaceHolder>" ; } initPlatformProtocolMap ( java . util . Set ) { java . util . Map < java . lang . Integer , org . kaaproject . kaa . server . sync . platform . PlatformE... | org . junit . Assert . assertTrue ( org . kaaproject . kaa . server . sync . platform . PlatformLookup . initPlatformProtocolMap ( platformProtocols ) . isEmpty ( ) ) |
testCompareIm2ColImpl ( ) { int [ ] miniBatches = new int [ ] { 1 , 3 , 5 } ; int [ ] depths = new int [ ] { 1 , 3 , 5 } ; int [ ] inHeights = new int [ ] { 5 , 21 } ; int [ ] inWidths = new int [ ] { 5 , 21 } ; int [ ] strideH = new int [ ] { 1 , 2 } ; int [ ] strideW = new int [ ] { 1 , 2 } ; int [ ] sizeW = new int ... | org . junit . Assert . assertEquals ( outOrig , outNew ) |
testComputeIndexMapZero ( ) { int [ ] expectedIndexMap = new int [ ] { } ; org . apache . avro . Schema designSchema = org . apache . avro . SchemaBuilder . record ( "Record" ) . fields ( ) . endRecord ( ) ; org . talend . codegen . enforcer . IndexMapperByIndex indexMapper = new org . talend . codegen . enforcer . Ind... | org . junit . Assert . assertArrayEquals ( expectedIndexMap , actualIndexMap ) |
testToString ( ) { org . opencastproject . job . api . Job newJob = new org . opencastproject . job . api . JobImpl ( 3L , "test" , "test_org" , 0L , "simple" , "do" , null , DISPATCHING , "localhost" , "remotehost" , null , null , null , 100L , 200L , "result" , 3L , 1L , true , null , 1.5F ) ; org . opencastproject .... | org . junit . Assert . assertEquals ( jpaJob . toString ( ) , jobString ) |
getAttributeCount ( ) { int expected = 10 ; when ( this . reader . getAttributeCount ( ) ) . thenReturn ( expected ) ; int result = this . filter . getAttributeCount ( ) ; "<AssertPlaceHolder>" ; } getAttributeCount ( ) { int expected = 10 ; when ( this . reader . getAttributeCount ( ) ) . thenReturn ( expected ) ; int... | org . junit . Assert . assertSame ( expected , result ) |
testSoftmax ( ) { org . nd4j . linalg . api . ndarray . INDArray vec = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 18 , 18 ) ; org . nd4j . linalg . api . ndarray . INDArray matrix = vec . dup ( ) . reshape ( 3 , 6 ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg ... | org . junit . Assert . assertEquals ( assertion , matrix ) |
testOrderedListSubitem ( ) { java . lang . String content = "\t\t1<sp>subitem" ; java . lang . String expected = "##<sp>subitem" ; java . lang . String actual = _translate ( content ) ; "<AssertPlaceHolder>" ; } _translate ( com . liferay . portal . kernel . exception . PortalException ) { if ( portalException instance... | org . junit . Assert . assertEquals ( expected , actual ) |
testClientkill ( ) { try { redis1 . clientkill ( io . craft . atom . redis . HOST , io . craft . atom . redis . PORT1 ) ; } catch ( io . craft . atom . redis . api . RedisException e ) { "<AssertPlaceHolder>" ; } System . out . println ( java . lang . String . format ( "[CRAFT-ATOM-REDIS]<sp>(^_^)<sp><%s><sp>Case<sp>->... | org . junit . Assert . assertTrue ( true ) |
testFindByAnswer ( ) { int cdsClientFormId = 10 ; java . lang . String answer = "Test<sp>answer" ; org . oscarehr . common . model . CdsClientFormData formData1 = new org . oscarehr . common . model . CdsClientFormData ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( f... | org . junit . Assert . assertEquals ( result , expectedResult ) |
testFindUser_empty_user ( ) { when ( jdbcTemplate . queryForObject ( anyString ( ) , ( ( org . springframework . jdbc . core . RowMapper ) ( anyObject ( ) ) ) , eq ( "" ) ) ) . thenReturn ( User . NULL_USER ) ; com . captaindebug . cargocult . User result = instance . findUser ( "" ) ; "<AssertPlaceHolder>" ; } findUse... | org . junit . Assert . assertEquals ( User . NULL_USER , result ) |
testGetImplicitHydrogenCount ( ) { java . lang . String rawMolSmiles = "[H]POOSC(Br)C(Cl)C(F)I" ; org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAt... | org . junit . Assert . assertEquals ( expResult , result ) |
lessThatEqualIsGreaterThan ( ) { when ( corc . getWritable ( com . hotels . corc . sarg . LessThanEvaluatorTest . COL0 ) ) . thenReturn ( com . hotels . corc . sarg . LessThanEvaluatorTest . TWO ) ; evaluator = new com . hotels . corc . sarg . LessThanEvaluator ( com . hotels . corc . sarg . LessThanEvaluatorTest . COL... | org . junit . Assert . assertThat ( evaluator . evaluate ( corc ) , org . hamcrest . CoreMatchers . is ( TruthValue . NO ) ) |
whenLoadingRolesFromCsvFile_thenLoaded ( ) { final java . util . List < org . baeldung . persistence . model . Role > roles = csvDataLoader . loadObjectList ( org . baeldung . persistence . model . Role . class , SetupData . ROLES_FILE ) ; "<AssertPlaceHolder>" ; } loadObjectList ( java . lang . Class , java . lang . S... | org . junit . Assert . assertFalse ( roles . isEmpty ( ) ) |
getResponseStatusReturnsResponseStatus ( java . io . InputStream ) { final com . microsoft . azure . sdk . iot . deps . transport . http . HttpMethod httpsMethod = com . microsoft . azure . sdk . iot . deps . transport . http . HttpMethod . GET ; final int status = 204 ; int expectedStatus = status ; new mockit . NonSt... | org . junit . Assert . assertThat ( testStatus , org . hamcrest . CoreMatchers . is ( expectedStatus ) ) |
testAddsApplicationConfigurationsOnStart ( ) { org . osgi . framework . BundleContext context = mock ( org . osgi . framework . BundleContext . class ) ; com . eclipsesource . jaxrs . publisher . internal . ServiceContainer container = new com . eclipsesource . jaxrs . publisher . internal . ServiceContainer ( context ... | org . junit . Assert . assertEquals ( properties . get ( "foo" ) , "bar" ) |
testToString ( ) { org . onosproject . routing . bgp . BgpRouteEntry bgpRouteEntry = generateBgpRouteEntry ( ) ; java . lang . String expectedString = "BgpRouteEntry{prefix=1.2.3.0/24,<sp>nextHop=5.6.7.8,<sp>" + ( ( ( "bgpId=10.0.0.1,<sp>origin=IGP,<sp>asPath=AsPath{pathSegments=" + "[PathSegment{type=AS_SEQUENCE,<sp>s... | org . junit . Assert . assertThat ( bgpRouteEntry . toString ( ) , org . hamcrest . Matchers . is ( expectedString ) ) |
createTestInterface ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . Packa... | org . junit . Assert . assertNotNull ( injector ) |
isFinite2 ( ) { org . diirt . util . stats . Range range1 = org . diirt . util . stats . Ranges . range ( 5.0 , 5.0 ) ; "<AssertPlaceHolder>" ; } isFinite ( ) { return ( ( ( ( ( min ) != ( max ) ) && ( ! ( java . lang . Double . isNaN ( min ) ) ) ) && ( ! ( java . lang . Double . isInfinite ( min ) ) ) ) && ( ! ( java ... | org . junit . Assert . assertThat ( range1 . isFinite ( ) , equalTo ( false ) ) |
testProfileFeedDataHandler ( ) { com . ibm . sbt . automation . core . test . pageobjects . JavaScriptPreviewPage previewPage = executeSnippet ( com . ibm . sbt . test . js . connections . profiles . api . ProfileFeedDataHandler . SNIPPET_ID ) ; java . util . List jsonList = previewPage . getJsonList ( ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( 4 , jsonList . size ( ) ) |
testHasResources ( ) { java . lang . Object resource = mock ( java . lang . Object . class ) ; application . addResource ( resource ) ; "<AssertPlaceHolder>" ; } hasResources ( ) { return ! ( resources . isEmpty ( ) ) ; } | org . junit . Assert . assertTrue ( application . hasResources ( ) ) |
runInTransactionShouldCallFunctionAndRollbackOnPreCommitConflict ( ) { final com . spotify . styx . storage . DatastoreStorage storage = new com . spotify . styx . storage . DatastoreStorage ( datastore , java . time . Duration . ZERO , storageTransactionFactory , executor ) ; final com . spotify . styx . storage . Che... | org . junit . Assert . assertTrue ( e . isConflict ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . mobile . device . rules . model . MDRAction . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( c... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testLocalDateTime ( ) { com . owlike . genson . ext . jodatime . LocalDateTime expected = new com . owlike . genson . ext . jodatime . LocalDateTime ( 2010 , 10 , 11 , 9 , 55 ) ; "<AssertPlaceHolder>" ; } deserialize ( com . owlike . genson . stream . ObjectReader , com . owlike . genson . Context ) { T obj ; if ( opti... | org . junit . Assert . assertEquals ( expected , genson . deserialize ( genson . serialize ( expected ) , com . owlike . genson . ext . jodatime . LocalDateTime . class ) ) |
testCookieSerializes ( ) { java . io . ByteArrayOutputStream byteArrayOutputStream = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream objectOutputStream = new java . io . ObjectOutputStream ( byteArrayOutputStream ) ; org . openqa . selenium . Cookie cookieToSerialize = new org . openqa . sele... | org . junit . Assert . assertThat ( cookieToSerialize , org . hamcrest . Matchers . equalTo ( deserializedCookie ) ) |
symmetric_set_difference_java ( ) { java . util . Set < java . lang . String > yourFriendsOrMyFriends = new java . util . HashSet < java . lang . String > ( yourFriends ) ; yourFriendsOrMyFriends . addAll ( myFriends ) ; com . levelup . java . collections . SymmetricDifferenceOfTwoSets . logger . info ( yourFriendsOrMy... | org . junit . Assert . assertEquals ( 12 , yourFriendsOrMyFriends . size ( ) ) |
testClassifyNoThresholdsAndClassifier ( ) { org . geotools . process . vector . ClassifyByRangeProcess cp = new org . geotools . process . vector . ClassifyByRangeProcess ( ) ; boolean error = false ; try { cp . execute ( fc , "value" , null , new java . lang . String [ ] { "A" , "B" , "C" , "D" } , null , null , true ... | org . junit . Assert . assertTrue ( error ) |
testDupRangeNoEndKey_GetPrev ( ) { open ( ) ; insert ( 1 , 1 ) ; insert ( 2 , 2 ) ; insert ( 3 , 2 ) ; insert ( 4 , 4 ) ; startInserts ( 5 , 3 ) ; checkPKeyRange ( 2 , 2 , true , null , false , 3 , 2 ) ; "<AssertPlaceHolder>" ; close ( ) ; } stopInserts ( ) { if ( ( insertThread ) == null ) { return true ; } final java... | org . junit . Assert . assertTrue ( stopInserts ( ) ) |
testDoWork_Unkonwn ( ) { final java . lang . String key = "foo:bar" ; final net . greghaines . jesque . meta . dao . impl . KeysDAORedisImpl . KeyDAOPoolWork work = new net . greghaines . jesque . meta . dao . impl . KeysDAORedisImpl . KeyDAOPoolWork ( key ) ; this . mockCtx . checking ( new org . jmock . Expectations ... | org . junit . Assert . assertNull ( keyInfo ) |
showLogs_withShowLogsMatchRandomImage ( ) { final io . fabric8 . maven . docker . config . ImageConfiguration imageConfig = new io . fabric8 . maven . docker . config . ImageConfiguration . Builder ( ) . name ( "name" ) . alias ( "alias" ) . build ( ) ; final io . fabric8 . maven . docker . service . helper . StartCont... | org . junit . Assert . assertFalse ( actual ) |
tryAddClient ( ) { int newPort = org . threadly . litesockets . utils . PortUtils . findUDPPort ( ) ; org . threadly . litesockets . udp . FakeUDPServerClient newFC = new org . threadly . litesockets . udp . FakeUDPServerClient ( SE ) ; org . threadly . litesockets . UDPServer newServer = SE . createUDPServer ( "localh... | org . junit . Assert . assertEquals ( 0 , SE . getClientCount ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . blogs . model . BlogsEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . po... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testDirDownload ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; org . apache . hadoop . fs . FileContext files = org . apache . hadoop . fs . FileContext . getLocalFSFileContext ( conf ) ; final org . apache . hadoop . fs . Path basedir = files . makeQual... | org . junit . Assert . assertTrue ( path . isDone ( ) ) |
testConstruct0 ( ) { boolean result = false ; java . lang . String queryString = "CONSTRUCT<sp>{?s<sp>?p<sp><http://www.semanticweb.org/ontologies/test/p1>}<sp>WHERE<sp>{?s<sp>?p<sp><http://www.semanticweb.org/ontologies/test/p1>}" ; try ( org . eclipse . rdf4j . repository . RepositoryConnection con = it . unibz . inf... | org . junit . Assert . assertFalse ( result ) |
testIsValidWithInvalidSessionInfo ( ) { org . openqa . selenium . server . BrowserSessionFactory . BrowserSessionInfo info = new org . openqa . selenium . server . BrowserSessionFactory . BrowserSessionInfo ( "id1" , "*firefox" , null , null , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( info ) |
equalsSameStringReturnsTrue ( ) { com . rackspacecloud . blueflood . types . Locator locator = com . rackspacecloud . blueflood . types . Locator . createLocatorFromDbKey ( "a.b.c" ) ; com . rackspacecloud . blueflood . types . Locator other = com . rackspacecloud . blueflood . types . Locator . createLocatorFromDbKey ... | org . junit . Assert . assertTrue ( locator . equals ( ( ( java . lang . Object ) ( other ) ) ) ) |
testRemove ( ) { com . liferay . portal . kernel . model . LayoutVersion newLayoutVersion = addLayoutVersion ( ) ; _persistence . remove ( newLayoutVersion ) ; com . liferay . portal . kernel . model . LayoutVersion existingLayoutVersion = _persistence . fetchByPrimaryKey ( newLayoutVersion . getPrimaryKey ( ) ) ; "<As... | org . junit . Assert . assertNull ( existingLayoutVersion ) |
testGetParams ( ) { fr . inria . soctrace . lib . model . Annotation a1 = getNewAnnotation ( ) ; fr . inria . soctrace . lib . model . Annotation a2 = getNewAnnotation ( ) ; "<AssertPlaceHolder>" ; } getParams ( ) { return params ; } | org . junit . Assert . assertEquals ( a1 . getParams ( ) , a2 . getParams ( ) ) |
testIsIndexWorkRequiredNodeMissing ( ) { when ( mockNodeDao . isNodeAvailable ( tableIdLong ) ) . thenReturn ( false ) ; when ( mockTableIndexDAO . doesIndexStateMatch ( anyString ( ) , anyLong ( ) , anyString ( ) ) ) . thenReturn ( false ) ; org . sagebionetworks . repo . model . table . TableStatus status = new org .... | org . junit . Assert . assertFalse ( workRequired ) |
testPathTo ( ) { com . epimorphics . lda . renderers . common . PropertyPath fooBar = new com . epimorphics . lda . renderers . common . PropertyPath ( "foo.bar" ) ; com . epimorphics . lda . renderers . common . DisplayHierarchyNode child = new com . epimorphics . lda . renderers . common . DisplayHierarchyNode ( fooB... | org . junit . Assert . assertSame ( fooBar , child . pathTo ( ) ) |
testDeleteUsernameAndPasswordForServiceURI ( ) { credentialManager . deleteUsernameAndPasswordForService ( org . apache . taverna . security . credentialmanager . impl . CredentialManagerImplTest . serviceURI ) ; credentialManager . addUsernameAndPasswordForService ( org . apache . taverna . security . credentialmanage... | org . junit . Assert . assertNull ( credentialManager . getUsernameAndPasswordForService ( org . apache . taverna . security . credentialmanager . impl . CredentialManagerImplTest . serviceURI , false , "" ) ) |
isUserInRole_SubscriptionManager ( ) { org . oscm . ui . model . User user = prepareUserWithRole ( UserRoleType . SUBSCRIPTION_MANAGER ) ; "<AssertPlaceHolder>" ; } isSubscriptionManager ( ) { return voUserDetails . getUserRoles ( ) . contains ( UserRoleType . SUBSCRIPTION_MANAGER ) ; } | org . junit . Assert . assertTrue ( user . isSubscriptionManager ( ) ) |
testName ( ) { "<AssertPlaceHolder>" ; } createSchema ( int ) { return createSchema ( createMap ( ) , expectedValidationIssues ) ; } | org . junit . Assert . assertEquals ( testName , createSchema ( 0 ) . convert ( ) . getName ( ) ) |
ignoreJavaTypes ( ) { com . github . mauricioaniche . ck . CKClassResult a = com . github . mauricioaniche . ck . metric . CBOTest . report . get ( "cbo.Coupling0" ) ; "<AssertPlaceHolder>" ; } getCbo ( ) { return cbo ; } | org . junit . Assert . assertEquals ( 0 , a . getCbo ( ) ) |
testInject_inject ( ) { org . evosuite . runtime . javaee . injection . InjectorTest . Foo foo = new org . evosuite . runtime . javaee . injection . InjectorTest . Foo ( ) ; org . evosuite . runtime . javaee . injection . Injector . inject ( foo , org . evosuite . runtime . javaee . injection . InjectorTest . Foo . cla... | org . junit . Assert . assertNotNull ( foo . getInjectField ( ) ) |
whenArrayIsOfCustomTypeThenMaxUsesCustomComparator ( ) { final com . baeldung . java_8_features . Car porsche = new com . baeldung . java_8_features . Car ( "Porsche<sp>959" , 319 ) ; final com . baeldung . java_8_features . Car ferrari = new com . baeldung . java_8_features . Car ( "Ferrari<sp>288<sp>GTO" , 303 ) ; fi... | org . junit . Assert . assertEquals ( bugatti , maxBySpeed ) |
testRenderMany ( ) { java . time . Instant date = java . time . Instant . ofEpochMilli ( 987654321098L ) ; io . datakernel . http . HttpCookie cookie1 = io . datakernel . http . HttpCookie . of ( "name1" , "value1" ) . withExpirationDate ( date ) . withMaxAge ( 10 ) . withPath ( "/test" ) . withDomain ( "www.google.com... | org . junit . Assert . assertEquals ( expected , io . datakernel . bytebuf . ByteBufStrings . asAscii ( buf ) ) |
testExpression6 ( ) { kendzi . kendzi3d . expressions . Context c = new kendzi . kendzi3d . expressions . Context ( ) ; c . registerFunction ( new kendzi . kendzi3d . expressions . functions . Vector3dFunction ( ) ) ; kendzi . kendzi3d . expressions . expression . Expression build = kendzi . kendzi3d . expressions . Ex... | org . junit . Assert . assertEquals ( new javax . vecmath . Vector3d ( 0 , 0 , 0 ) , value ) |
testLengthStripList ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<length(strip(names))>" ) ; e . add ( "names" , java . util . Arrays . asList ( null , "Tom" , null , null , "Sriram" , null ) ) ; java . lang . String expecting = "2" ; "<AssertPlaceHolder>" ; } render ( ) { return rende... | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
whenUpdateModelThenGetUpdatedModel ( ) { nbc . add ( 1 , testModel ) ; vkaretko . Model updateModel = new vkaretko . Model ( "test2" ) ; try { nbc . update ( 1 , updateModel ) ; } catch ( vkaretko . OptimisticException e ) { e . printStackTrace ( ) ; } "<AssertPlaceHolder>" ; } get ( K ) { return this . cache . getOrDe... | org . junit . Assert . assertThat ( nbc . get ( 1 ) , org . hamcrest . core . Is . is ( updateModel ) ) |
testWrapUserException ( ) { com . dremio . common . exceptions . UserException uex = com . dremio . common . exceptions . UserException . dataReadError ( ) . message ( "this<sp>is<sp>a<sp>data<sp>read<sp>exception" ) . build ( com . dremio . common . exceptions . TestUserException . logger ) ; java . lang . Exception w... | org . junit . Assert . assertEquals ( uex , com . dremio . common . exceptions . UserException . systemError ( wrapped ) . build ( com . dremio . common . exceptions . TestUserException . logger ) ) |
testQueryStringMatchesWithRegex ( ) { org . ocpsoft . rewrite . servlet . config . Query query = org . ocpsoft . rewrite . servlet . config . Query . valueExists ( "{*}ve{*}" ) ; query . setParameterStore ( store ) ; "<AssertPlaceHolder>" ; } evaluate ( org . ocpsoft . rewrite . event . Rewrite , org . ocpsoft . rewrit... | org . junit . Assert . assertTrue ( query . evaluate ( rewrite , context ) ) |
getTestMethodSourceCode_A$TestMethodMeta_GivenWhenThen_JUnit3 ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; config . junitVersion = org . junithelper . core . config . JUnitVersion . version3 ; config . testingPatternExplicitComment = org . ... | org . junit . Assert . assertEquals ( expected , actual ) |
testFollowerPkHashcode ( ) { org . eurekastreams . server . domain . GroupFollower . GroupFollowerPk sut = new org . eurekastreams . server . domain . GroupFollower . GroupFollowerPk ( 1L , 2L ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int hashCode = 0 ; hashCode ^= new java . lang . Long ( getId ( ) ) . hashCode ( )... | org . junit . Assert . assertNotNull ( sut . hashCode ( ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . blade . samples . jndiservicebuilder . model . Region > regions = _persistence . fetchByP... | org . junit . Assert . assertTrue ( regions . isEmpty ( ) ) |
testGetDrugs ( ) { org . drugis . addis . entities . Study s = org . drugis . addis . ExampleData . buildStudyDeWilde ( ) ; java . util . Set < org . drugis . addis . entities . treatment . TreatmentDefinition > expected = new java . util . HashSet < org . drugis . addis . entities . treatment . TreatmentDefinition > (... | org . junit . Assert . assertEquals ( expected , s . getTreatmentDefinitions ( ) ) |
testGetCursorControl_withInvisibleNestedControl ( ) { org . eclipse . swt . widgets . Display_Test . setCursorLocation ( display , 234 , 345 ) ; org . eclipse . swt . widgets . Shell shell = new org . eclipse . swt . widgets . Shell ( display ) ; shell . setBounds ( 100 , 100 , 500 , 500 ) ; shell . setVisible ( true )... | org . junit . Assert . assertSame ( composite , display . getCursorControl ( ) ) |
testGetAccounts ( ) { com . google . gson . JsonObject account1 = org . restcomm . connect . testsuite . http . RestcommAccountsTool . getInstance ( ) . getAccount ( deploymentUrl . toString ( ) , adminUsername , adminAuthToken , childUsername ) ; com . google . gson . JsonObject account2 = org . restcomm . connect . t... | org . junit . Assert . assertTrue ( account1 . toString ( ) . equals ( account2 . toString ( ) ) ) |
testPut ( ) { java . nio . ByteBuffer original = java . nio . ByteBuffer . wrap ( "Newport" . getBytes ( ) ) ; java . nio . ByteBuffer key = java . nio . ByteBuffer . wrap ( "Billy" . getBytes ( ) ) ; com . devwebsphere . TestAPIs . client . put ( "map" , key , original ) ; java . nio . ByteBuffer value = com . devwebs... | org . junit . Assert . assertArrayEquals ( original . array ( ) , value . array ( ) ) |
testS13ServerSessionStartsIdleState ( ) { org . jdiameter . api . s13 . ServerS13Session session = getAppSession ( org . jdiameter . api . s13 . ServerS13Session . class , new org . jdiameter . common . impl . app . s13 . S13SessionFactoryImpl ( org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . se... | org . junit . Assert . assertEquals ( state . IDLE , state ) |
testGetOwnedOperation1 ( ) { if ( ! ( org . dresdenocl . metamodels . test . MetaModelTestServices . supportsNoOperations ) ) { java . util . List < org . dresdenocl . pivotmodel . Operation > operations ; boolean foundOperation1 ; boolean foundOperation2 ; java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>T... | org . junit . Assert . assertFalse ( msg , foundOperation2 ) |
testWithoutSecurityManager ( ) { java . lang . System . setSecurityManager ( null ) ; "<AssertPlaceHolder>" ; } getRegistry ( ) { final java . lang . SecurityManager sm = java . lang . System . getSecurityManager ( ) ; if ( sm != null ) { sm . checkPermission ( new java . lang . RuntimePermission ( ( ( com . arjuna . w... | org . junit . Assert . assertNotNull ( com . arjuna . webservices11 . ServiceRegistry . getRegistry ( ) ) |
shouldEvaluatorReadFilledSurveyForHisPublication ( ) { users . loginAsEvaluator ( ) ; final org . adaptiveplatform . surveys . acceptance . FilledSurveyDto survey = dao . getSurvey ( filledSurveyId ) ; "<AssertPlaceHolder>" ; } getSurvey ( java . lang . Long ) { org . adaptiveplatform . surveys . dto . FilledSurveyDto ... | org . junit . Assert . assertNotNull ( survey ) |
testPersistirEmpresa ( ) { com . kazale . pontointeligente . api . entities . Empresa empresa = this . empresaService . persistir ( new com . kazale . pontointeligente . api . entities . Empresa ( ) ) ; "<AssertPlaceHolder>" ; } persistir ( com . kazale . pontointeligente . api . entities . Empresa ) { com . kazale . p... | org . junit . Assert . assertNotNull ( empresa ) |
testLossFunction ( ) { weka . dl4j . lossfunctions . LossBinaryXENT loss = new weka . dl4j . lossfunctions . LossBinaryXENT ( ) ; wrapper . setLossFn ( loss ) ; "<AssertPlaceHolder>" ; } getLossFn ( ) { return weka . dl4j . lossfunctions . LossFunction . create ( backend . getLossFn ( ) ) ; } | org . junit . Assert . assertEquals ( loss , wrapper . getLossFn ( ) ) |
shouldThrowIllegalArgumentExceptionForEntity ( ) { final uk . gov . gchq . gaffer . operation . data . generator . EdgeIdExtractor extractor = new uk . gov . gchq . gaffer . operation . data . generator . EdgeIdExtractor ( ) ; final uk . gov . gchq . gaffer . data . element . Entity entity = new uk . gov . gchq . gaffe... | org . junit . Assert . assertNotNull ( e ) |
getUserDisplayName ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String displayName = "vmmtestuser" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_TDSLDAP_FailoverTest . c , "getUserDisplayName" , "Checking<sp>with<sp>a<sp>vali... | org . junit . Assert . assertEquals ( displayName , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_TDSLDAP_FailoverTest . servlet . getUserDisplayName ( user ) ) |
testSetPath ( ) { metadata . setPath ( "testname" ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return ( file ) != null ? file . toString ( ) : null ; } | org . junit . Assert . assertEquals ( "testname" , metadata . getPath ( ) ) |
testCast ( ) { org . cyclopsgroup . jmxterm . utils . SizeAware s = org . cyclopsgroup . jmxterm . utils . WeakCastUtils . cast ( new java . util . ArrayList < java . lang . Integer > ( java . util . Arrays . asList ( 1 , 2 , 3 ) ) , org . cyclopsgroup . jmxterm . utils . SizeAware . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 3 , s . size ( ) ) |
testAddDateTimeProperty ( ) { java . net . URI test_object = java . net . URI . create ( "test:jimlunch" ) ; org . dataconservancy . packaging . tool . model . dprofile . PropertyType type = profile . getCreatedPropertyType ( ) ; org . dataconservancy . packaging . tool . model . dprofile . Property val = new org . dat... | org . junit . Assert . assertTrue ( has_property ( test_object , val ) ) |
getCompleted_nilResult ( ) { final java . util . concurrent . CompletableFuture < java . lang . Void > future = completedFuture ( null ) ; "<AssertPlaceHolder>" ; } getCompleted ( java . util . concurrent . CompletionStage ) { java . util . concurrent . CompletableFuture < T > future = stage . toCompletableFuture ( ) ;... | org . junit . Assert . assertNull ( com . spotify . futures . CompletableFutures . getCompleted ( future ) ) |
testDecrypt_1 ( ) { final org . apache . shindig . gadgets . oauth2 . persistence . sample . NoOpEncrypter fixture = new org . apache . shindig . gadgets . oauth2 . persistence . sample . NoOpEncrypter ( ) ; final java . lang . String encryptedSecret = "secretin" ; final byte [ ] bytes = fixture . decrypt ( encryptedSe... | org . junit . Assert . assertEquals ( "secretin" , result ) |
testFindAll ( ) { io . katharsis . resource . list . ResourceList < io . katharsis . meta . model . MetaElement > list = repository . findAll ( new io . katharsis . queryspec . QuerySpec ( io . katharsis . meta . model . MetaElement . class ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return map . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( list . isEmpty ( ) ) |
testSelectLiveGroupAsParentSite ( ) { com . liferay . portal . kernel . model . Group group = com . liferay . portal . kernel . test . util . GroupTestUtil . addGroup ( ) ; com . liferay . portal . kernel . test . util . GroupTestUtil . enableLocalStaging ( group ) ; "<AssertPlaceHolder>" ; com . liferay . portal . ker... | org . junit . Assert . assertTrue ( group . hasStagingGroup ( ) ) |
testRowVectorGemm ( ) { org . nd4j . linalg . api . ndarray . INDArray linspace = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 , DataType . DOUBLE ) . reshape ( 1 , ( - 1 ) ) . castTo ( DataType . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray other = org . nd4j . linalg . factory . Nd4j . lin... | org . junit . Assert . assertEquals ( assertion , result ) |
shouldSingleLookupGetCountOnObject ( ) { com . couchbase . client . java . SubDocumentTest . ctx . ignoreIfClusterUnder ( new com . couchbase . client . java . util . features . Version ( 5 , 0 , 0 ) ) ; com . couchbase . client . java . subdoc . DocumentFragment < com . couchbase . client . core . message . kv . subdo... | org . junit . Assert . assertEquals ( 1L , result . content ( "sub" ) ) |
testInnerClass ( ) { io . netty . util . internal . TypeParameterMatcher m = io . netty . util . internal . TypeParameterMatcher . find ( new io . netty . util . internal . TypeParameterMatcherTest . V < java . lang . String > ( ) . u , io . netty . util . internal . TypeParameterMatcherTest . U . class , "E" ) ; "<Ass... | org . junit . Assert . assertTrue ( m . match ( new java . lang . Object ( ) ) ) |
testGetSetNoSet ( ) { java . lang . reflect . Field [ ] fields = com . j256 . ormlite . field . FieldTypeTest . GetSetNoSet . class . getDeclaredFields ( ) ; "<AssertPlaceHolder>" ; java . lang . reflect . Field idField = fields [ 0 ] ; com . j256 . ormlite . field . FieldType . createFieldType ( databaseType , com . j... | org . junit . Assert . assertTrue ( ( ( fields . length ) >= 1 ) ) |
testClone_1 ( ) { lombok . val mesh1 = new org . nd4j . parameterserver . distributed . v2 . util . MeshOrganizer ( org . nd4j . parameterserver . distributed . v2 . enums . MeshBuildMode . MESH ) ; for ( int e = 0 ; e < 8192 ; e ++ ) mesh1 . addNode ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; lombok . val... | org . junit . Assert . assertEquals ( mesh1 , mesh2 ) |
setValidParameterName ( ) { org . springframework . integration . xquery . support . XQueryParameter param = new org . springframework . integration . xquery . support . XQueryParameter ( "testName" ) ; "<AssertPlaceHolder>" ; } getParameterName ( ) { return parameterName ; } | org . junit . Assert . assertEquals ( "testName" , param . getParameterName ( ) ) |
testCompareSetDefaults ( ) { com . ibm . ws . resource . internal . ResourceRefConfigImpl rrc1 = new com . ibm . ws . resource . internal . ResourceRefConfigImpl ( "name" , "type" ) ; com . ibm . ws . resource . internal . ResourceRefConfigImpl rrc2 = new com . ibm . ws . resource . internal . ResourceRefConfigImpl ( "... | org . junit . Assert . assertTrue ( conflicts . toString ( ) , conflicts . isEmpty ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.