Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Денисова Элина 396 JUnit #559

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

ElinRin
Copy link
Contributor

@ElinRin ElinRin commented Dec 17, 2014

No description provided.

@vpavlenko vpavlenko self-assigned this Dec 17, 2014

public class HandlerException {
public static void handler(String message, Throwable cause) {
System.err.println(message + cause.getMessage());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно поставить "." между сообщениями

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправлено.

@TafTafa
Copy link

TafTafa commented Dec 20, 2014

$ create q
created
$ use q
using q
$ get a
InteractiveParse: Unknown errornull

Process finished with exit code 1

Кажется, что правильно будет not found, а не завершать программу.

@TafTafa
Copy link

TafTafa commented Dec 20, 2014

$ put as
$ put: need two arguments
put as My name is Alina.
new
$ get as
found
My
$

Наверное, нужно или всю строку учитывать "My name is Alina." или написать, туже ошибку "Need two arguments". Хотя не понятно, как программа должна это обрабатывать...

@TafTafa
Copy link

TafTafa commented Dec 20, 2014

$ put a a
new
$ remove a
removed
$ exit
$ 2 unsaved changes

Наверное, в данном случае стоит считать, что изменений нет.

@TafTafa
Copy link

TafTafa commented Dec 20, 2014

$ create a
created
$ use a
using a
$ put a a
new
$

После этого не должно создаваться никаких новых файлов, кроме папки a. Вся остальная запись/удаление с диска ведется только по commit.

int hashCode = Math.abs(key.hashCode());
int dir = hashCode % COUNT_OBJECT;
int file = hashCode / COUNT_OBJECT % COUNT_OBJECT;
String adds = Integer.toString(dir * COMMON_CONSTANT_INDEX + file);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дублирование кода из строк 71-74


@Test
public void testGetName() {
assertEquals("table", table.getName());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Завершается с Failure

@vpavlenko
Copy link
Collaborator

Разнесите все классы по пакетам: пакет абстрактного интерпретатора, пакет базы, пакет команд

}

public static Commands getCommand(String word) throws IllegalArgumentException {
for (Commands command : Commands.values()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Положите все команды в Map и доставайте команды из него, а не так

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кажется, я залила старый вариант -_-

vpavlenko referenced this pull request in ElinRin/tables-with-junit Mar 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants