This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class KalturaVideoProviderTest { | |
| private static final Logger log = LogManager.getLogger(KalturaVideoProviderTest.class); | |
| private static KalturaVideoProvider kalturaVideoProvider; | |
| private static KalturaClient kalturaClient; | |
| private static CreateVideoActionBean bean ; | |
| private static VideoService videoService; | |
| private static VideoMetadataManager videoMetadataManager; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Unit testing with Mock objects using Mockito | |
| -------------------------------------------- | |
| 2 concepts | |
| - mock (create object using mocks) | |
| - stub (modify a created object with stub). useful methods when stubbing are: | |
| - when | |
| - doReturn | |
| How mock object works | |
| --------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.renderUI = function(res) { | |
| var connected = (res.user != null && res.user.isConnected); | |
| var contactsData = []; | |
| if(connected) { | |
| $j('#jive-modal-invite').trigger('close'); | |
| contactsData['contacts'] = gigya.socialize.getContacts({callback: function(response){ // How can I async js this line such that only when this returns should alert be called? | |
| contactsData['contacts'] = response; | |
| }}); | |
| alert(contactsData); // returns null | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html lang="en"> | |
| <title>Gigya Social Demo - getContacs</title> | |
| <script type="text/javascript" lang="javascript" src="http://cdn.gigya.com/js/socialize.js?apikey=xx"> | |
| </script> | |
| <script type="text/javascript" src="jquery.js"></script> | |
| <script type="text/javascript"> | |
| gigya.socialize.addEventHandlers({ onConnectionAdded: renderUI, onConnectionRemoved: renderUI }); | |
| gigya.socialize.showAddConnectionsUI({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| function onContributionWizardAfterAddEntry(entries) { | |
| for(var i = 0; i < entries.length; i++) { | |
| parent.top.$j("#externalVideoID").val(entries[i].entryId); | |
| } | |
| } | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ---------- Forwarded message ---------- | |
| From: Mark S. Miller <[email protected]> | |
| Date: Tue, Nov 16, 2010 at 3:44 PM | |
| Subject: "Future of Javascript" doc from our internal "JavaScript Summit" | |
| last week | |
| To: [email protected] | |
| On November 10th and 11th, a number of Google teams representing a variety | |
| of viewpoints on client-side languages met to agree on a common vision for | |
| the future of Javascript. |
NewerOlder