input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
dataPointsCollectionFieldsShouldBeRecognized ( ) { java . util . List < org . junit . experimental . theories . PotentialAssignment > assignments = org . junit . tests . experimental . theories . TheoryTestUtils . potentialAssignments ( org . junit . tests . experimental . theories . internal . AllMembersSupplierTest .... | org . junit . Assert . assertEquals ( 2 , assignments . size ( ) ) |
manageOperationsProcess_VSERVER_START_REQUESTED ( ) { doReturn ( Boolean . TRUE ) . when ( vServerProcessor . vserverComm ) . startVServer ( paramHandler ) ; org . oscm . app . iaas . data . FlowState result = vServerProcessor . manageOperationsProcess ( "controllerId" , "instanceId" , paramHandler , FlowState . VSERVE... | org . junit . Assert . assertEquals ( FlowState . VSERVER_STARTING , result ) |
testEmptyFolder ( ) { java . lang . String path = pathTo ( "emptyFolder" ) ; java . util . Set < org . eclipse . emf . common . util . URI > uris = new org . eclipse . xtext . mwe . PathTraverser ( ) . findAllResourceUris ( path , org . eclipse . xtext . mwe . PathTraverserTest . everythingButDummy ) ; "<AssertPlaceHol... | org . junit . Assert . assertTrue ( uris . isEmpty ( ) ) |
testStructuredEventWithoutStartTimeProperty ( ) { org . jacorb . notification . interfaces . Message _event = messageFactory_ . newMessage ( structuredEvent_ ) ; "<AssertPlaceHolder>" ; } hasStartTime ( ) { return false ; } | org . junit . Assert . assertTrue ( ( ! ( _event . hasStartTime ( ) ) ) ) |
testGetParameter_multipleValues ( ) { org . eclipse . rap . json . JsonObject parameters = new org . eclipse . rap . json . JsonObject ( ) . add ( "param1" , new org . eclipse . rap . json . JsonArray ( ) . add ( "foo" ) . add ( "bar" ) ) ; fakeParameters ( parameters ) ; "<AssertPlaceHolder>" ; } getParameter ( java .... | org . junit . Assert . assertEquals ( "foo" , service . getParameter ( "param1" ) ) |
testMethodReturnsUnaccessibleClass ( ) { org . evosuite . Properties . CLASS_PREFIX = "some.package" ; org . evosuite . Properties . TARGET_CLASS = "some.package.Foo" ; java . lang . reflect . Method m = getMethod ( com . examples . with . different . packagename . otherpackage . ExampleWithStaticPackagePrivateInnerCla... | org . junit . Assert . assertFalse ( result ) |
testToImmutableSet_Empty ( ) { java . util . List < java . lang . String > vals = java . util . Arrays . asList ( ) ; com . google . common . collect . ImmutableSet < java . lang . String > res = vals . stream ( ) . collect ( org . cyclop . common . Gullectors . toImmutableSet ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ... | org . junit . Assert . assertTrue ( res . isEmpty ( ) ) |
testSelectNonExistingProperty ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; org . codehaus . preon . el . Document document = new org . codehaus . preon . el . util . StringBuilderDocument ( builder ) ; java . lang . String propertyName = "pi" ; org . codehaus . preon . el . Referenc... | org . junit . Assert . assertNotNull ( selected ) |
testResumeConcurrently_CheckRemoteAccess ( ) { org . junit . Assume . assumeTrue ( org . eclipse . aether . connector . basic . PartialFileTest . PROPER_LOCK_SUPPORT ) ; remoteAccessChecker . exception = new java . io . IOException ( "missing" ) ; org . eclipse . aether . connector . basic . PartialFileTest . Concurren... | org . junit . Assert . assertSame ( remoteAccessChecker . exception , e ) |
algorithmCompatibleWithMethod_dsa_wrongSignatureMethod ( ) { org . oscm . saml2 . api . SamlKeySelector keySelector = mock ( org . oscm . saml2 . api . SamlKeySelector . class , Mockito . CALLS_REAL_METHODS ) ; boolean result = keySelector . algorithmCompatibleWithMethod ( "wrong<sp>method" , keySelector . ALGORITHM_DS... | org . junit . Assert . assertFalse ( result ) |
testFilterNotPublishedIncludeInactive ( ) { com . liferay . portal . workflow . web . internal . util . filter . WorkflowDefinitionActivePredicate predicate = new com . liferay . portal . workflow . web . internal . util . filter . WorkflowDefinitionActivePredicate ( com . liferay . portal . workflow . web . internal .... | org . junit . Assert . assertTrue ( result ) |
testGetSecurityRoles ( ) { org . finra . herd . model . api . xml . SecurityRoleKeys securityRoleKeys = new org . finra . herd . model . api . xml . SecurityRoleKeys ( com . google . common . collect . Lists . newArrayList ( new org . finra . herd . model . api . xml . SecurityRoleKey ( SECURITY_ROLE ) ) ) ; when ( sec... | org . junit . Assert . assertEquals ( securityRoleKeys , result ) |
testObjectSleutelNetNietVerlopenSleutel ( ) { final java . lang . Long nu = new java . util . Date ( ) . getTime ( ) ; final java . lang . Long vierenTwintigUurMinusEenSecondeGeleden = nu - 86399000 ; final nl . bzk . brp . webservice . business . service . ObjectSleutel objectSleutel = new nl . bzk . brp . webservice ... | org . junit . Assert . assertNotNull ( objectSleutel ) |
testConnectionId_isSentWithServerPushRequest ( ) { connectionProvider . setConnection ( new org . eclipse . rap . rwt . cluster . testfixture . test . TestHttpUrlConnection ( "responseContent" ) ) ; org . eclipse . rap . rwt . cluster . testfixture . client . RWTClient client = new org . eclipse . rap . rwt . cluster .... | org . junit . Assert . assertTrue ( connectionUrl . contains ( expectedCidParam ) ) |
equality ( ) { org . silverpeas . components . organizationchart . model . PersonCategory firstSecretary = new org . silverpeas . components . organizationchart . model . PersonCategory ( "Secretary" , "secretary" , 0 ) ; org . silverpeas . components . organizationchart . model . PersonCategory secondSecretary = new o... | org . junit . Assert . assertThat ( firstSecretary . equals ( secondSecretary ) , is ( true ) ) |
mnsIssue ( ) { java . io . File wsdl = getCodegenQEDataFileInput ( "http://www.ebay.com/marketplace/mobile/v1/services" 7 ) ; java . lang . String [ ] testArgs = new java . lang . String [ ] { "http://www.ebay.com/marketplace/mobile/v1/services" 1 , "RIMApplicationProcessService" , "-genType" , "http://www.ebay.com/mar... | org . junit . Assert . assertNull ( prefix ) |
enumValUpdateTest ( ) { java . lang . String eventSchemaJSON = org . apache . apex . malhar . lib . appdata . schemas . SchemaUtils . jarResourceFileToString ( "adsGenericEventSchema.json" ) ; org . apache . apex . malhar . lib . appdata . schemas . DimensionalSchema dimensional = new org . apache . apex . malhar . lib... | org . junit . Assert . assertEquals ( replacementEnums , newEnums ) |
testReturnVoidCase ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "class<sp>Z<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "public<sp>void<sp>ret()<sp>{" ) ; _builder . newLine ( ... | org . junit . Assert . assertNotNull ( clazz ) |
queryObjectList ( ) { com . dexcoder . dal . build . Criteria criteria = com . dexcoder . dal . build . Criteria . select ( com . dexcoder . test . model . User . class ) . include ( "loginName" ) ; java . util . List < java . lang . String > list = jdbcDao . queryObjectList ( criteria , java . lang . String . class ) ... | org . junit . Assert . assertNotNull ( list ) |
testPathTo_Int_Benzene ( ) { org . openscience . cdk . interfaces . IAtomContainer simple = org . openscience . cdk . templates . TestMoleculeFactory . makeBenzene ( ) ; org . openscience . cdk . graph . ShortestPaths paths = new org . openscience . cdk . graph . ShortestPaths ( simple , simple . getAtom ( 0 ) ) ; "<As... | org . junit . Assert . assertArrayEquals ( new int [ ] { 0 , 1 , 2 , 3 } , paths . pathTo ( 3 ) ) |
testInterfacesProxiedProperly ( ) { org . openqa . selenium . WebDriver actual = new org . openqa . selenium . support . ThreadGuardTest . PermissiveStubDriver ( ) ; final org . openqa . selenium . WebDriver webdriver = org . openqa . selenium . support . ThreadGuard . protect ( actual ) ; org . openqa . selenium . int... | org . junit . Assert . assertNotNull ( hasTouchScreen ) |
testGetRelativeTargetDepth ( ) { dictionary . edit ( ) ; net . sf . extjwnl . data . Synset s1 = dictionary . createSynset ( POS . NOUN ) ; net . sf . extjwnl . data . Synset s2 = dictionary . createSynset ( POS . NOUN ) ; net . sf . extjwnl . data . Synset s3 = dictionary . createSynset ( POS . NOUN ) ; net . sf . ext... | org . junit . Assert . assertEquals ( 0 , r . getRelativeTargetDepth ( ) ) |
testInvalidVolume ( ) { statusList . add ( "volume:<sp>junk" ) ; when ( commandExecutor . sendCommand ( properties . getStatus ( ) ) ) . thenReturn ( statusList ) ; "<AssertPlaceHolder>" ; } getVolume ( ) { return serverStatus . getVolume ( ) ; } | org . junit . Assert . assertEquals ( 0 , serverStatus . getVolume ( ) ) |
testBuildWithOrderBy ( ) { org . lnu . is . domain . degree . type . DegreeType context = new org . lnu . is . domain . degree . type . DegreeType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
setValue_severalBoundFieldsAndBoundBinder_singleEventOnSetValue ( ) { binder . forField ( nameField ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . forField ( ageField ) . withConverter ( new com . vaadin . data . converter . StringToIntegerConverter ( "" ) ) . bind ( Person :: getAge , Person :... | org . junit . Assert . assertNull ( event . get ( ) ) |
testMultipleInvocationsClearLine ( ) { org . aesh . tty . TestConnection connection = new org . aesh . tty . TestConnection ( ) ; org . aesh . command . registry . CommandRegistry registry = org . aesh . command . impl . registry . AeshCommandRegistryBuilder . builder ( ) . command ( org . aesh . command . AeshCommandM... | org . junit . Assert . assertEquals ( 1 , org . aesh . command . AeshCommandMultipleInvocations . counter ) |
testChangeMaxRows ( ) { org . seasar . doma . boot . autoconfigure . DomaAutoConfigurationTest . EnvironmentTestUtils . addEnvironment ( this . context , "doma.max-rows:100" ) ; this . context . register ( org . seasar . doma . boot . autoconfigure . DomaAutoConfiguration . class , org . springframework . boot . autoco... | org . junit . Assert . assertThat ( config . getMaxRows ( ) , org . hamcrest . CoreMatchers . is ( 100 ) ) |
testEmpty ( ) { org . apache . kylin . measure . dim . DimCountDistinctCounter counter = org . apache . kylin . measure . dim . DimCountDistinctAggFunc . init ( ) ; "<AssertPlaceHolder>" ; } result ( org . apache . kylin . measure . dim . DimCountDistinctCounter ) { return counter == null ? 0L : counter . result ( ) ; ... | org . junit . Assert . assertEquals ( 0 , org . apache . kylin . measure . dim . DimCountDistinctAggFunc . result ( counter ) ) |
testGetClientInfoProperties ( ) { final net . meisen . dissertation . jdbc . TidaDatabaseMetaData meta = new net . meisen . dissertation . jdbc . TidaDatabaseMetaData ( conn ) ; java . sql . ResultSet res ; final net . meisen . dissertation . jdbc . DriverProperties expected = conn . getDriverProperties ( ) ; res = met... | org . junit . Assert . assertEquals ( res . getObject ( 3 ) , expected . get ( res . getString ( 1 ) ) ) |
testUnhealthyResultsStartEmpty ( ) { "<AssertPlaceHolder>" ; } getUnhealthyResults ( ) { return com . google . common . collect . Iterables . filter ( _results , new com . google . common . base . Predicate < com . bazaarvoice . ostrich . HealthCheckResult > ( ) { @ com . bazaarvoice . ostrich . healthcheck . Override ... | org . junit . Assert . assertTrue ( com . google . common . collect . Iterables . isEmpty ( _results . getUnhealthyResults ( ) ) ) |
testDoi ( ) { org . sagebionetworks . client . AsynchJobType type = AsynchJobType . Doi ; java . lang . String actual = type . getResultUrl ( token , ( ( java . lang . String ) ( null ) ) ) ; java . lang . String expected = "/doi/async/get/abcdefgh" ; "<AssertPlaceHolder>" ; } getResultUrl ( java . lang . String , java... | org . junit . Assert . assertEquals ( actual , expected ) |
isReady_serverThrowsIOException ( ) { final uk . co . flax . biosolr . ontology . config . SolrConfiguration config = mock ( uk . co . flax . biosolr . ontology . config . SolrConfiguration . class ) ; org . apache . solr . client . solrj . SolrClient server = mock ( org . apache . solr . client . solrj . SolrClient . ... | org . junit . Assert . assertFalse ( engine . isReady ( ) ) |
testCachedTableValuesReturnsCachedResultWithinExpiryTime ( ) { java . util . Map < java . lang . String , java . lang . Object > config1 = java . util . Collections . singletonMap ( "k" , ( ( java . lang . Object ) ( "v" ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > config2 = java . util . C... | org . junit . Assert . assertSame ( results , cached . cachedValue ( config2 , ( expiry - 1L ) ) ) |
testGetLastLogRecordAsync ( ) { org . apache . distributedlog . LogRecordWithDLSN record = mock ( org . apache . distributedlog . LogRecordWithDLSN . class ) ; when ( impl . getLastLogRecordAsync ( ) ) . thenReturn ( java . util . concurrent . CompletableFuture . completedFuture ( record ) ) ; "<AssertPlaceHolder>" ; v... | org . junit . Assert . assertEquals ( record , org . apache . distributedlog . util . FutureUtils . result ( manager . getLastLogRecordAsync ( ) ) ) |
testSetZeroes2 ( ) { int [ ] [ ] matrix = new int [ ] [ ] { new int [ ] { 0 , 1 } } ; t . setZeroes2 ( matrix ) ; "<AssertPlaceHolder>" ; } setZeroes2 ( int [ ] [ ] ) { if ( ( matrix == null ) || ( ( matrix . length ) == 0 ) ) { return ; } boolean rowHasZero = false ; boolean colHasZero = false ; for ( int i = 0 ; i < ... | org . junit . Assert . assertArrayEquals ( new int [ ] { 0 , 0 } , matrix [ 0 ] ) |
testCreateFail ( ) { when ( rpc . invokeRpc ( eq ( toPath ( org . opendaylight . netconf . sal . connect . netconf . NETCONF_GET_QNAME ) ) , any ( ) ) ) . thenReturn ( immediateFailedFluentFuture ( new org . opendaylight . mdsal . dom . api . DOMRpcImplementationNotAvailableException ( "not<sp>available" ) ) ) ; final ... | org . junit . Assert . assertTrue ( availableYangSchemasQNames . isEmpty ( ) ) |
canPrintColumnNames ( ) { au . com . bytecode . opencsv . MockResultSet resultSet = new au . com . bytecode . opencsv . MockResultSet ( ) ; au . com . bytecode . opencsv . MockResultSetMetaData metaData = new au . com . bytecode . opencsv . MockResultSetMetaData ( ) ; java . lang . String [ ] expectedNames = new java .... | org . junit . Assert . assertArrayEquals ( expectedNames , columnNames ) |
canConfigureTtlMillis ( ) { long ttlMillis = 123L ; java . lang . String json = "{\"http\":{\"server\":{\"ttlMillis\":<sp>123}}}" ; com . spotify . apollo . http . server . HttpServerConfig http = com . spotify . apollo . http . server . HttpServerConfigTest . conf ( json ) ; "<AssertPlaceHolder>" ; } ttlMillis ( ) { r... | org . junit . Assert . assertEquals ( ttlMillis , http . ttlMillis ( ) ) |
testWildcardGrabsSubtree2 ( ) { java . lang . String grammar = "(1<sp>2<sp>3)\n" 4 + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>x=INT<sp>y=INT<sp>z=INT<sp>-><sp>ID<sp>^($x<sp>$y<sp>$z);\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "(1<sp>2<sp>3)\n" 7 ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}... | org . junit . Assert . assertEquals ( "(1<sp>2<sp>3)\n" , found ) |
testCheckForCrash ( ) { final ch . cyberduck . core . CrashReporter reporter = ch . cyberduck . core . CrashReporter . create ( ) ; "<AssertPlaceHolder>" ; reporter . checkForCrash ( "https://crash.cyberduck.io/report" ) ; } create ( ) { return ch . cyberduck . core . CrashReporter . CLASS . alloc ( ) . init ( ) ; } | org . junit . Assert . assertNotNull ( reporter ) |
testMSTORE8_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "602255" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { r... | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
isFolderAndMkDir ( ) { this . fsa . isFolder ( this . path ) ; this . fsa . mkdir ( this . path ) ; "<AssertPlaceHolder>" ; } getChildrenListeners ( ) { return this . childrenListeners ; } | org . junit . Assert . assertTrue ( this . registry . getChildrenListeners ( ) . isEmpty ( ) ) |
testHandleSetSelectionIndex ( ) { handler = new org . eclipse . swt . internal . widgets . combokit . ComboOperationHandler ( combo ) ; combo . add ( "item<sp>1" ) ; combo . add ( "item<sp>2" ) ; handler . handleSet ( new org . eclipse . rap . json . JsonObject ( ) . add ( "selectionIndex" , 1 ) ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( 1 , combo . getSelectionIndex ( ) ) |
container_withSpecialDataFileCharacters_shouldBeValid ( ) { org . digidoc4j . impl . asic . manifest . ManifestParser manifestParser = this . createManifest ( dataFile ( "dds_JRI<sp><sp><sp>pev.txt" , "application/octet-stream" ) ) ; java . util . List < eu . europa . esig . dss . DSSDocument > detachedContents = java ... | org . junit . Assert . assertTrue ( errors . isEmpty ( ) ) |
testCoercionOfStringValueWithoutQuotes ( ) { final java . lang . String str = "package<sp>org.drools.compiler.test;<sp>\n" + ( ( ( ( ( ( "declare<sp>A\n" + "<sp>field<sp>:<sp>String\n" ) + "rule<sp>R<sp>when\n" 0 ) + "rule<sp>R<sp>when\n" ) + "<sp>A(<sp>field<sp>==<sp>12<sp>)\n" ) + "then\n" ) + "rule<sp>R<sp>when\n" 0... | org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) ) |
setType ( ) { org . pentaho . di . core . dnd . DragAndDropContainer dnd = new org . pentaho . di . core . dnd . DragAndDropContainer ( DragAndDropContainer . TYPE_BASE_JOB_ENTRY , "Step<sp>Name" ) ; dnd . setType ( DragAndDropContainer . TYPE_BASE_STEP_TYPE ) ; "<AssertPlaceHolder>" ; } getType ( ) { return type ; } | org . junit . Assert . assertEquals ( DragAndDropContainer . TYPE_BASE_STEP_TYPE , dnd . getType ( ) ) |
list_elementCollection_of_enum ( ) { com . querydsl . jpa . QEmployee employee = QEmployee . employee ; com . querydsl . jpa . EnumPath < com . querydsl . jpa . JobFunction > jobFunction = com . querydsl . jpa . Expressions . enumPath ( com . querydsl . jpa . JobFunction . class , "jf" ) ; com . querydsl . jpa . List <... | org . junit . Assert . assertEquals ( 4 , jobFunctions . size ( ) ) |
getDeviceCapabilitiesSucceed ( ) { tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . EnrollmentGroup enrollmentGroup = makeMockedSymmetricKeyEnrollmentGroup ( ) ; final com . microsoft . azure . sdk . iot . deps . twin . DeviceCapabilities capabilities = new com . microsoft . azure... | org . junit . Assert . assertEquals ( capabilities , actualDeviceCapabilities ) |
testAcceptInValidParameter ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "add<sp>propertx<sp>myProperty" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console ... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) ) |
test6 ( ) { int nbResults = executeQuery ( ( "PREFIX<sp>:<sp><http://meraka/moss/exampleBooks.owl#>\n" + ( ( ( ( ( ( ( ( "\n" + "SELECT<sp>?x<sp>?title<sp>\n" ) + "{" ) + "<sp>?x<sp>a<sp>:Store;\n" ) + "<sp>:sells<sp>?y<sp>;\n" ) + "<sp>:name<sp>\'Athesia\'<sp>.\n" ) + "<sp>?y<sp>a<sp>:Book;\n" ) + "<sp>:title<sp>?titl... | org . junit . Assert . assertEquals ( 5 , nbResults ) |
testAnchor ( ) { net . kyori . text . Component component = TextParsers . XML_PARSER . parse ( "<a<sp>href=\"bar\">foo</a>" ) ; net . kyori . text . TextComponent expected = net . kyori . text . TextComponent . of ( "" ) . append ( net . kyori . text . TextComponent . of ( "foo" ) . clickEvent ( new net . kyori . text ... | org . junit . Assert . assertEquals ( expected , component ) |
testFormatLogMessage_code_is_null ( ) { java . lang . String code = null ; java . lang . String message = "message" ; java . lang . String actualLogMessage = testTarget . formatLogMessage ( code , message ) ; java . lang . String expectedLogMessage = "[UNDEFINED-CODE]<sp>" + message ; "<AssertPlaceHolder>" ; } formatLo... | org . junit . Assert . assertThat ( actualLogMessage , org . hamcrest . CoreMatchers . is ( expectedLogMessage ) ) |
testEncodeDecodeSignature ( ) { java . security . KeyPairGenerator factory = java . security . KeyPairGenerator . getInstance ( "EC" ) ; factory . initialize ( testCase . getEcParameterSpec ( ) . getCurve ( ) . getField ( ) . getFieldSize ( ) ) ; java . security . interfaces . ECPrivateKey privateKey = ( ( java . secur... | org . junit . Assert . assertArrayEquals ( signature , decoded ) |
testGetConnection_Concurrent ( ) { org . apache . cayenne . datasource . PoolingDataSourceIT . PoolTask [ ] tasks = new org . apache . cayenne . datasource . PoolingDataSourceIT . PoolTask [ 2 ] ; for ( int i = 0 ; i < ( tasks . length ) ; i ++ ) { tasks [ i ] = new org . apache . cayenne . datasource . PoolingDataSour... | org . junit . Assert . assertEquals ( 100 , task . i . get ( ) ) |
mergeWithDifferentBoolean ( ) { puck . thrifty . datatype . BooleanElement elem = new puck . thrifty . datatype . BooleanElement ( "test" ) ; puck . thrifty . datatype . Element mergeElem = elem . merge ( new puck . thrifty . datatype . BooleanElement ( "test" ) ) ; "<AssertPlaceHolder>" ; } merge ( puck . thrifty . da... | org . junit . Assert . assertSame ( elem , mergeElem ) |
testAddFieldsInTheMiddle ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . wire . TextWire wire = new net . openhft . chronicle . wire . TextWire ( net . openhft . chronicle . bytes . Bytes . elasticHeapByteBuffer ( 100 ) ) ; wire . getValueOut ( ) . object ( new net . openhft . chronicle . wi... | org . junit . Assert . assertNotNull ( wire . getValueIn ( ) . object ( ) ) |
testEquals ( ) { org . makersoft . shards . ShardId shardId_a = new org . makersoft . shards . ShardId ( 0 ) ; org . makersoft . shards . ShardId shardId_b = new org . makersoft . shards . ShardId ( 0 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( object instanceof org . makersoft . shards . utils... | org . junit . Assert . assertTrue ( shardId_a . equals ( shardId_b ) ) |
testAromaticElementF ( ) { for ( int num = 1 ; num < 54 ; ++ num ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( AROMATIC_ELEMENT , num ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . I... | org . junit . Assert . assertFalse ( expr . matches ( atom ) ) |
testPadding ( ) { java . lang . String css = "Composite<sp>{<sp>padding:<sp>1px<sp>2px<sp>3px<sp>4px<sp>}" ; org . eclipse . rap . rwt . internal . theme . ThemeTestUtil . registerTheme ( "custom" , css , null ) ; org . eclipse . rap . rwt . internal . theme . ThemeTestUtil . setCurrentThemeId ( "custom" ) ; org . ecli... | org . junit . Assert . assertEquals ( expected , composite . getPadding ( ) ) |
testBuildWithDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . education . type . EducationType context = new org . lnu . is . domain . education . type . EducationType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>EducationType<sp>e<sp... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testGet ( ) { com . dongsw . authority . model . User result = userService . get ( java . lang . Integer . valueOf ( 0 ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { return dao . unique ( id ) ; } | org . junit . Assert . assertEquals ( new com . dongsw . authority . model . User ( ) , result ) |
testListIsSmallerThanNames ( ) { final java . lang . String [ ] names = new java . lang . String [ ] { "ade" , "welcome" , "wasWeiIch" , "undNochEins" } ; final ucar . nc2 . Variable [ ] result = org . esa . beam . dataio . netcdf . util . ReaderUtils . getVariables ( variables , names ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertNull ( result ) |
readContentOnlyRoom ( ) { java . lang . String content = readFile ( "JsonRoomContentOnly.json" ) ; org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer ( ) . getEntitySet ( "Rooms" ) ; java . io .... | org . junit . Assert . assertEquals ( 4 , result . getProperties ( ) . size ( ) ) |
getTotalPrice ( ) { boolean vatAvailable = true ; this . cut = new com . airhacks . workshops . business . registrations . entity . Registration ( vatAvailable , 2 , 1 ) ; java . util . function . BiFunction < java . lang . Boolean , java . lang . Integer , java . lang . Integer > taxCalculator = mock ( java . util . f... | org . junit . Assert . assertThat ( totalPrice , org . hamcrest . CoreMatchers . is ( expectedPrice ) ) |
thereIsNoPhaseAfterNullIfThereAreNoPhases ( ) { com . metservice . kanban . model . WorkItemType typeWithNoPhases = new com . metservice . kanban . model . WorkItemType ( ) ; "<AssertPlaceHolder>" ; } hasPhaseAfter ( java . lang . String ) { if ( phase == null ) { return ( phases . size ( ) ) > 0 ; } else { return ( ph... | org . junit . Assert . assertThat ( typeWithNoPhases . hasPhaseAfter ( null ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testResolveOK ( ) { org . ff4j . utils . IOUtil . setUseInetAddress ( true ) ; org . ff4j . utils . IOUtil . resolveHostName ( ) ; "<AssertPlaceHolder>" ; } isUseInetAddress ( ) { return org . ff4j . utils . IOUtil . useInetAddress ; } | org . junit . Assert . assertTrue ( org . ff4j . utils . IOUtil . isUseInetAddress ( ) ) |
testClientState ( ) { final java . lang . String hexKB = "fd5c747806c07ce0b9d69dcfea144663e630b65ec4963596a22f24910d7dd15d" ; final byte [ ] byteKB = org . mozilla . gecko . sync . Utils . hex2Byte ( hexKB ) ; final java . lang . String clientState = org . mozilla . gecko . background . fxa . FxAccountUtils . computeCl... | org . junit . Assert . assertEquals ( expected , clientState ) |
testMapManufacuringFacilityToDTSNullValues ( ) { java . util . Map < java . lang . String , java . lang . Object > betriebsstaetteMap = getManufacturingFacility ( 2L , "Second" ) ; ma . glasnost . orika . test . community . issue25 . modelA . ManufacturingFacility manufacturingFacility = ( ( ma . glasnost . orika . tes... | org . junit . Assert . assertTrue ( manufacturingFacility . equals ( betriebsstaetteMappedBack ) ) |
add_string_enablesChaining ( ) { "<AssertPlaceHolder>" ; } add ( java . lang . String , int ) { if ( index < 255 ) { int slot = hashSlotFor ( name ) ; if ( ( hashTable [ slot ] ) == 0 ) { hashTable [ slot ] = ( ( byte ) ( index + 1 ) ) ; } } } | org . junit . Assert . assertSame ( object , object . add ( "a" , "foo" ) ) |
testGetNormalizedMass ( ) { org . openscience . cdk . tools . AtomicProperties props = org . openscience . cdk . tools . AtomicProperties . getInstance ( ) ; double mass = props . getNormalizedMass ( "C" ) ; "<AssertPlaceHolder>" ; } getNormalizedMass ( java . lang . String ) { return ( this . getMass ( symbol ) ) / ( ... | org . junit . Assert . assertTrue ( ( mass > 0 ) ) |
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>Name" ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . domain . degree . type . DegreeType source = new org . lnu . is . domain . degree . type . DegreeType ( ) ; source . setId ( id ) ; source . setAbbrName ( ... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
testPublicAddedFieldAccessibleThroughGetFields ( ) { boolean found = false ; for ( java . lang . reflect . Field f : a . org . fakereplace . test . replacement . instancefield . InstanceFieldReflection . class . getFields ( ) ) { if ( f . getName ( ) . equals ( "vis" ) ) { found = true ; } } "<AssertPlaceHolder>" ; } e... | org . junit . Assert . assertTrue ( found ) |
executeEqualsOverrideOnInstancesOfDifferentSubclassThanTheOneMocked ( mockit . ObjectOverridesAndInjectableMocksTest$Subclass1 ) { java . lang . Object s1 = new mockit . ObjectOverridesAndInjectableMocksTest . Subclass2 ( ) ; java . lang . Object s2 = new mockit . ObjectOverridesAndInjectableMocksTest . Subclass2 ( ) ;... | org . junit . Assert . assertTrue ( cmp ) |
checkServerIsRunning ( ) { boolean isRunning = this . mainTarget . request ( MediaType . WILDCARD ) . get ( org . eftp . ftpserver . business . management . Boolean . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( isRunning ) |
testClone ( ) { org . openscience . cdk . interfaces . IChemFile file = ( ( org . openscience . cdk . interfaces . IChemFile ) ( newChemObject ( ) ) ) ; java . lang . Object clone = file . clone ( ) ; "<AssertPlaceHolder>" ; } clone ( ) { org . openscience . cdk . formula . IsotopeContainer isoClone = new org . opensci... | org . junit . Assert . assertTrue ( ( clone instanceof org . openscience . cdk . interfaces . IChemFile ) ) |
add_all_some_existing ( ) { final java . util . List < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > tsdata = create_tsdata_ ( 10 ) . collect ( java . util . stream . Collectors . toList ( ) ) ; final java . util . Set < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > result = ... | org . junit . Assert . assertTrue ( impl . addAll ( tsdata ) ) |
testNumberOfChunks ( ) { analyze . chunking . ChunkType chunkType = new analyze . chunking . ChunkOnValue ( "date" ) ; analyze . chunking . Chunker chunker = new analyze . chunking . Chunker ( ) ; model . ChunkedSequentialData chunks = ( ( model . ChunkedSequentialData ) ( chunker . chunk ( linkedGroups . get ( "1" ) ,... | org . junit . Assert . assertEquals ( 2 , chunks . size ( ) ) |
testConverteerBijhoudingOpgeschort ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3InschrijvingInhoud > lo3InschrijvingStapel = buildInschrijving ( Lo3RedenOpschortingBijhoudingCodeEnum . OVERLIJDEN , new nl . bzk . migratiebrp... | org . junit . Assert . assertEquals ( 4 , migratieBijhoudingStapel . size ( ) ) |
testSerialization ( ) { org . jfree . data . xy . YIntervalSeriesCollection c1 = new org . jfree . data . xy . YIntervalSeriesCollection ( ) ; org . jfree . data . xy . YIntervalSeries s1 = new org . jfree . data . xy . YIntervalSeries ( "Series" ) ; s1 . add ( 1.0 , 1.1 , 1.2 , 1.3 ) ; java . io . ByteArrayOutputStrea... | org . junit . Assert . assertEquals ( c1 , c2 ) |
should_test_equaliy_on_key_same_case ( ) { fr . norad . visuwall . providers . sonar . domain . SonarQualityMetric metric1 = new fr . norad . visuwall . providers . sonar . domain . SonarQualityMetric ( ) ; metric1 . key = "key1" ; fr . norad . visuwall . providers . sonar . domain . SonarQualityMetric metric2 = new fr... | org . junit . Assert . assertEquals ( metric1 , metric2 ) |
testNavigate_negative ( ) { getComponent ( com . hp . alm . ali . idea . util . EditSourceUtil . class ) . _setNavigator ( new com . hp . alm . ali . idea . util . EditSourceUtil . Navigator ( ) { @ com . hp . alm . ali . idea . navigation . recognizer . Override public void navigate ( com . intellij . navigation . Nav... | org . junit . Assert . assertTrue ( result ) |
fromParamClassToClass ( ) { java . lang . reflect . Method m = org . raml . utilities . types . CastTest . Foo . class . getMethod ( "foo" ) ; java . lang . Class c = org . raml . utilities . types . Cast . toClass ( m . getReturnType ( ) ) ; "<AssertPlaceHolder>" ; } toClass ( java . lang . reflect . Type ) { if ( typ... | org . junit . Assert . assertSame ( org . raml . utilities . types . CastTest . Foo . class , c ) |
testAsErrorReply ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder db = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "ok" , 1 ) ; db . push ( "n" ) ; final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Collections... | org . junit . Assert . assertNotNull ( error ) |
manageActivationProcess_VSERVER_ACTIVATION_REQUESTED ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_ACTIVATION_REQUESTED ; org . oscm . app . iaas . data . FlowState newState = null ; newState = vServerProcessor . manageActivationProcess ( "controllerId... | org . junit . Assert . assertNull ( newState ) |
readerCantCreateEntry ( ) { dummyLogin . login ( org . nuxeo . ecm . directory . multi . TestMultiDirectorySecurity1 . READER_USER ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap ( ) ; map . put ( "uid" , "5" ) ; map . put ( "thefoo" , "foo5" ) ; map . put ( "thebar... | org . junit . Assert . assertNull ( entry ) |
test_contactdb_lists__list_id__recipients_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Me... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
testGetAttributeAsString ( ) { int val = 13123 ; com . j256 . simplejmx . client . JmxClientTest . client . setAttribute ( com . j256 . simplejmx . client . JmxClientTest . objectName , "x" , val ) ; java . lang . String result = com . j256 . simplejmx . client . JmxClientTest . client . getAttributeString ( com . j256... | org . junit . Assert . assertEquals ( java . lang . Integer . toString ( val ) , result ) |
testCyclic_Int ( ) { int [ ] [ ] g = new int [ ] [ ] { new int [ ] { 5 , 1 } , new int [ ] { 0 , 2 } , new int [ ] { 1 , 3 } , new int [ ] { 2 , 4 } , new int [ ] { 3 , 5 } , new int [ ] { 4 , 0 } } ; org . openscience . cdk . ringsearch . CyclicVertexSearch search = new org . openscience . cdk . ringsearch . RegularCy... | org . junit . Assert . assertTrue ( search . cyclic ( v ) ) |
testJsonPrimitiveObject ( ) { com . owlike . genson . bean . Primitives p = createPrimitives ( ) ; java . lang . String json = genson . serialize ( p ) ; "<AssertPlaceHolder>" ; } jsonString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "{\"arrayOfPrimitives\":[" ) ; if ( ( ... | org . junit . Assert . assertEquals ( p . jsonString ( ) , json ) |
occurrencesOfString ( ) { int count = com . gs . collections . impl . utility . StringIterate . occurrencesOf ( "1a2a3" , "a" ) ; "<AssertPlaceHolder>" ; } occurrencesOf ( java . lang . String , char ) { return com . gs . collections . impl . utility . StringIterate . occurrencesOfChar ( string , value ) ; } | org . junit . Assert . assertEquals ( 2 , count ) |
considersPropertiesOnGeneratedSourceAndTargetTypes ( ) { org . mapstruct . itest . targettypegeneration . usage . Order order = new org . mapstruct . itest . targettypegeneration . usage . Order ( ) ; order . setItem ( "my<sp>item" ) ; org . mapstruct . itest . targettypegeneration . usage . OrderDto dto = OrderMapper ... | org . junit . Assert . assertEquals ( order . getItem ( ) , dto . getItem ( ) ) |
testPingCommandStatusApiException ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; final com . cloud . network . nicira . ControlClusterStatus ccs = mock ( com . cloud . network . nicira . ControlClusterStatus . class ) ; when ( ccs . getClusterStatus ( ) ) . thenReturn ( "unstable" ) ; when ( nvpApi .... | org . junit . Assert . assertTrue ( ( ping == null ) ) |
hasNoPermissionToAddResourceRelationWhenUserUserHasNoPermissionToUpdateResourceAndResourceIsNotInstanceOfApplicationResType ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceEntity as = resourceEntityBuilder . mockAppServerEntity ( "as" , null , null , null ) ; when ( sessionContext . isCalle... | org . junit . Assert . assertFalse ( canAdd ) |
testRequisiteConfig ( ) { org . dcache . gplazma . strategies . AuthenticationStrategy strategy = strategyFactory . newAuthenticationStrategy ( ) ; "<AssertPlaceHolder>" ; strategy . setPlugins ( successRequisitePlugins ) ; java . util . Set < java . lang . Object > publicCredential = com . google . common . collect . ... | org . junit . Assert . assertNotNull ( strategy ) |
testUpdatePassword ( ) { org . codice . ddf . admin . core . impl . AdminConsoleService configAdmin = getConfigAdmin ( ) ; java . util . Dictionary < java . lang . String , java . lang . Object > currentProps = new java . util . Hashtable ( ) ; currentProps . put ( "TestKey_0_12" , "secret" ) ; when ( org . codice . dd... | org . junit . Assert . assertThat ( captor . getValue ( ) . get ( "TestKey_0_12" ) , org . hamcrest . Matchers . equalTo ( "newPassword" ) ) |
testJooq ( ) { com . serotonin . m2m2 . rt . event . type . SystemEventType type = new com . serotonin . m2m2 . rt . event . type . SystemEventType ( com . serotonin . m2m2 . rt . event . type . SystemEventType . TYPE_SYSTEM_STARTUP ) ; long timestamp = Common . timer . currentTimeMillis ( ) ; for ( int i = 0 ; i < 100... | org . junit . Assert . assertEquals ( 100 , ( ( int ) ( count . getValue ( ) ) ) ) |
testEffect6 ( ) { java . lang . String words = segW . segWords ( "" , "|" ) ; "<AssertPlaceHolder>" ; } segWords ( java . lang . String , java . lang . String ) { return segWords ( new java . io . StringReader ( txt ) , wordSpilt ) ; } | org . junit . Assert . assertEquals ( "" , words ) |
testRemoveFirstOnEmptyQueue ( ) { "<AssertPlaceHolder>" ; } dequeueNoWait ( ) { synchronized ( lock ) { if ( ( ! ( isRunning ( ) ) ) || ( isEmpty ( ) ) ) { return null ; } return removeFirst ( ) ; } } | org . junit . Assert . assertNull ( queue . dequeueNoWait ( ) ) |
testCommandCompleter ( ) { org . onosproject . vpls . cli . completer . VplsCommandCompleter commandCompleter = new org . onosproject . vpls . cli . completer . VplsCommandCompleter ( ) ; java . util . List < java . lang . String > choices = commandCompleter . choices ( ) ; java . util . List < java . lang . String > e... | org . junit . Assert . assertEquals ( expected , choices ) |
testGetConnectionManager ( ) { com . googlecode . cqengine . index . sqlite . ConnectionManager connectionManager = mock ( com . googlecode . cqengine . index . sqlite . ConnectionManager . class ) ; com . googlecode . cqengine . query . option . QueryOptions queryOptions = mock ( com . googlecode . cqengine . query . ... | org . junit . Assert . assertEquals ( connectionManager , carFeaturesOffHeapIndex . getConnectionManager ( queryOptions ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.