- first item
- second item done
- third item
This file contains 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 fr.xebia.ateliers.cloudbees.saucelab; | |
import static org.junit.Assert.assertEquals; | |
import java.net.URL; | |
import java.util.concurrent.TimeUnit; | |
import org.junit.After; | |
import org.junit.Before; |
This file contains 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 CustomList { | |
private boolean readOnly; | |
private Object[] elements; | |
private int size; | |
public CustomList() { | |
this.elements = new Object[0]; | |
this.size = 0; | |
this.readOnly = true; |
This file contains 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 SetCarrierServiceFacade { | |
@Autowired | |
private CarrierService carrierService; | |
@Autowired | |
private UserService userService; | |
@Autowired | |
private UserContactPointService userContactPointService; |
This file contains 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 SetCarrierServiceFacadeTest { | |
@InjectMocks | |
private SetCarrierServiceFacade facade; | |
@Mock | |
private CarrierService carrierService; | |
@Mock | |
private UserContactPointService userContactPointService; |
This file contains 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 SetCarrierServiceFacade { | |
@Autowired | |
private CarrierService carrierService; | |
@Autowired | |
private UserService userService; | |
@Autowired | |
private UserContactPointService userContactPointService; |
This file contains 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 SetCarrierServiceFacadeTest { | |
@InjectMocks | |
private SetCarrierServiceFacade facade; | |
@Mock | |
private CarrierService carrierService; | |
@Mock | |
private UserContactPointService userContactPointService; |
This file contains 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
#!/usr/bin/env ruby | |
require 'rack' | |
class MyApplication | |
def initialize | |
@routes = [ {:pattern => "poney", :response => lambda do |env, match| | |
[ 200, {'Content-Type' => 'text/html'}, ['<html><body><h1>Poney Islandais</h1></body></html>'] ] | |
end | |
}, {:pattern => "hello", :response => lambda do |env, match| |
This file contains 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
Customer = Struct.new(:name, :address) | |
c = Customer.new('john') # Do not validate construction | |
c.name # => 'john' | |
c.address # => nil | |
c['name'] # => 'john' | |
# Extra unneeded API to access your property | |
c['name'] = 'robert' |
This file contains 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
# A good intermediary for internal-only access of instance variables | |
# Here the example is with the access on the 'sauce' instance variable | |
class Salad | |
def initialize(sauce) | |
@sauce = sauce | |
end | |
attr_reader :sauce |
OlderNewer