Commit cf40f4a4 authored by root's avatar root
Browse files
parents 9b752d22 4508e43d
Pipeline #170886 passed with stages
in 45 seconds
......@@ -17,6 +17,23 @@ public class QueryProcessor {
"his works of hard science fiction and popular science. \n");
if (query.toLowerCase().contains("turing")) {
results.append("Alan Mathison Turing OBE FRS (23 June 1912 – 7 June 1954) was an\n" +
" English mathematician, computer scientist, logician, cryptanalyst, philosopher, \n" +
"and theoretical biologist.[6][7] Turing was highly influential in the development \n" +
"of theoretical computer science, providing a formalisation of the concepts of algorithm\n" +
" and computation with the Turing machine, which can be considered a model of a general-purpose\n" +
" computer. Turing is widely considered to be the father of theoretical computer science \n" +
"and artificial intelligence.\n");
if (query.toLowerCase().contains("neumann")) {
results.append("John von Neumann (December 28, 1903 – February 8, 1957) was a Hungarian-American\n" +
" mathematician, physicist, computer scientist, engineer and polymath. Von Neumann was generally\n" +
" regarded as the foremost mathematician of his time[2] and said to be \"the last representative\n" +
" of the great mathematicians\". He integrated pure and applied sciences.\n");
return results.toString();
......@@ -25,6 +25,16 @@ public class QueryProcessorTest {
assertThat(queryProcessor.process("Asimov"), containsString("science fiction"));
public void knowsAboutTuring() throws Exception {
assertThat(queryProcessor.process("turing"), containsString("Turing machine"));
public void knowsAboutNeumann() throws Exception {
assertThat(queryProcessor.process("neumann"), containsString("pure and applied sciences"));
public void isNotCaseSensitive() throws Exception {
assertThat(queryProcessor.process("shakespeare"), containsString("playwright"));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment