From c9851384b8b8ecc3099b4b8bacd2482f59ba7f91 Mon Sep 17 00:00:00 2001 From: Mark Struchkov Date: Sun, 20 Jan 2019 23:02:09 +0300 Subject: [PATCH] BugFix --- src/main/java/org/sadtech/autoresponder/Autoresponder.java | 3 +-- src/test/java/org/sadtech/autoresponder/AutoresponderTest.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/sadtech/autoresponder/Autoresponder.java b/src/main/java/org/sadtech/autoresponder/Autoresponder.java index 6e6246c..46171e9 100644 --- a/src/main/java/org/sadtech/autoresponder/Autoresponder.java +++ b/src/main/java/org/sadtech/autoresponder/Autoresponder.java @@ -37,8 +37,7 @@ public class Autoresponder { if (personService.checkPerson(idPerson)) { person = personService.getPersonById(idPerson); } else { - person = new Person(); - person.setId(idPerson); + person = new Person(idPerson); personService.addPerson(person); } return person; diff --git a/src/test/java/org/sadtech/autoresponder/AutoresponderTest.java b/src/test/java/org/sadtech/autoresponder/AutoresponderTest.java index 29879d2..b883179 100644 --- a/src/test/java/org/sadtech/autoresponder/AutoresponderTest.java +++ b/src/test/java/org/sadtech/autoresponder/AutoresponderTest.java @@ -123,4 +123,4 @@ // Assert.assertEquals(autoresponder.answer(100, "Привет это тест срабатывания"), "Здравствуйте, вы написали в нашу компанию!"); // Assert.assertEquals(autoresponder.answer(100, "Привет это тест срабатывания"), "Ответ с {0} параметрами!"); // } -} \ No newline at end of file +//} \ No newline at end of file