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 primefactors | |
import spock.lang.Specification | |
class PrimeFactorsSpec extends Specification{ | |
def "api to t test nothing"(){ | |
expect: "nothing" == "nothing" | |
} | |
def "API to test prime factors of given integer"(){ |
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 primefactors | |
import spock.lang.Specification | |
class PrimeFactorsSpec extends Specification{ | |
def "api to t test nothing"(){ | |
expect: "nothing" == "nothing" | |
} | |
def "API to test prime factors of given integer"(){ |
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 primefactors | |
import spock.lang.Specification | |
class PrimeFactorsSpec extends Specification{ | |
def "api to t test nothing"(){ | |
expect: "nothing" == "nothing" | |
} | |
def "API to test prime factors of given integer"(){ |
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 primefactors | |
import spock.lang.Specification | |
class PrimeFactorsSpec extends Specification{ | |
def "api to t test nothing"(){ | |
expect: "nothing" == "nothing" | |
} | |
def "API to test prime factors of given integer"(){ |
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 primefactors | |
import spock.lang.Specification | |
class PrimeFactorsSpec extends Specification{ | |
def "api to t test nothing"(){ | |
expect: "nothing" == "nothing" | |
} | |
def "API to test prime factors of given integer"(){ |
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 primefactors | |
import spock.lang.Specification | |
class PrimeFactorsSpec extends Specification{ | |
def "api to t test nothing"(){ | |
expect: "nothing" == "nothing" | |
} | |
} |
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
plugins { | |
id 'groovy' | |
id 'java' | |
} | |
group 'sapan.demo' | |
version '1.0-SNAPSHOT' | |
sourceCompatibility = 1.8 |
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 Reviewanswer getAnswer(int questionId) throws DataNotFoundException { | |
String sql = "select * from answers where questionid=:questionId"; | |
Map<String, Object> params = new HashMap<>(); | |
params.put("questionId",questionId); | |
Reviewanswer answer = new Reviewanswer(); | |
try { | |
answer = namedParameterJdbcTemplate.queryForObject(sql,params,Reviewanswer.class); | |
}catch (DataAccessException ex){ | |
if("data not found(or something on similar lines)".equals(ex.getMessage())){ | |
throw new DataNotFoundException(); |
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 Reviewanswer getAnswer(int questionId) { | |
String sql = "select * from answers where questionid=:questionId"; | |
Map<String, Object> params = new HashMap<>(); | |
Reviewanswer answer = new Reviewanswer(); | |
params.put("questionId",questionId); | |
try { | |
answer = namedParameterJdbcTemplate.queryForObject(sql,params,Reviewanswer.class); | |
}catch (DataAccessException ex){ | |
Logger.getLogger(this.getClass().getName()).log(Level.ALL,ex.getLocalizedMessage()); | |
} |
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
refresh(){ | |
Broker.getInstance().sendMessage(Broker.CommonTopics.ON_TAX_CHANGE,Collections.emptyMap()); | |
} |
NewerOlder