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 ShardsOGlassSalesman { | |
private BoxOfGlassPops boxOfGlassPops; | |
... | |
@Autowired | |
public void setBoxOfGlassPops(BoxOfGlassPops boxOfGlassPops) { | |
this.boxOfGlassPops = boxOfGlassPops; | |
} | |
} |
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
if(squirrel.getId() == otherSquirrel.getId()) { | |
squirrel.goFindSomeNutsOrSomething(); | |
} |
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 ActionSupport implements TextProvider, ... { | |
private final transient TextProvider textProvider = | |
new TextProviderFactory().createInstance(getClass(), this); | |
... | |
public String getText(String aTextName) { | |
return textProvider.getText(aTextName); | |
} |
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
@Before | |
public void feelDirty() { | |
target = new MyActionSupportSubclass() { | |
@Override public String getText(String aTextName) { | |
return aTextName; | |
} | |
@Override public String getText(String key, String[] args) { | |
return key + ":" + StringUtils.join(args, ','); | |
} | |
}; |
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
(function($){ | |
$.jasmine = { | |
isReady:false, | |
rootId: 'specContainer', | |
inject:function(html,overwriteAll) { | |
if($.cil.jasmine.isReady === false) $.cil.jasmine.init(); | |
if(overwriteAll === true) { | |
$('#'+$.cil.jasmine.rootId).html(html); | |
} else { | |
$('#'+$.cil.jasmine.rootId).append(html); |
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
package com.pillartechnology.matchers; | |
import java.util.HashSet; | |
import java.util.Set; | |
import javax.validation.ConstraintViolation; | |
import javax.validation.Validation; | |
import javax.validation.Validator; | |
import org.hamcrest.Description; |
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
private HtmlPage getPage(String html) { | |
MockWebConnection webConnection = new MockWebConnection(); | |
webConnection.setDefaultResponse(html); | |
WebClient webClient = new WebClient(); | |
webClient.setWebConnection(webConnection); | |
try { | |
return webClient.getPage("http://blah"); | |
} catch (Exception e) { | |
throw new RuntimeException(e); | |
} |
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
@interface ... { | |
UITextField *someField; | |
} | |
- (IBAction)dismissKeyboard:(id)sender; | |
{ | |
[someField becomeFirstResponder]; | |
[someField resignFirstResponder]; | |
} |
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
module TabulaRasa | |
class BlankSlate | |
instance_methods.each { |m| undef_method m unless m =~ /^__/ } | |
end | |
class Stub < BlankSlate | |
attr_accessor :stubbings | |
attr_reader :invocations | |
def initialize(cls) |
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 id="someTemplate" type="text/html"> | |
<span class="warning-image"></span><p>{{ error }}</p></span> | |
</script> | |
------ | |
(function($){ | |
$.fn.renderTemplate = function(name,context) { | |
$(this).html(_($('#'+name).html()).template(context)); |