Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarieTask committed Jan 29, 2024
1 parent 408742d commit 1f574c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/src/test/java/hexlet/code/TestMapSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

public class TestMapSchema {
private MapSchema schema;
private Validator validator;
private static final int MIN_LENGTH = 3;
private static final int MAX_LENGTH = 100;
private static final int IN_RANGE = 25;
Expand All @@ -23,7 +24,8 @@ public class TestMapSchema {

@BeforeEach
public void beforeEach() {
schema = Validator.map();
validator = new Validator();
schema = validator.map();
}

// Пока не вызван метод required(), null и пустая строка считаются валидным
Expand Down
4 changes: 3 additions & 1 deletion app/src/test/java/hexlet/code/TestNumberSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ public class TestNumberSchema {
private static final int LESS_ZERO = -5;
private static final int ZERO = 0;
private NumberSchema schema;
private Validator validator;

@BeforeEach
public void beforeEach() {
schema = Validator.number();
validator = new Validator();
schema = validator.number();
}

// Пока не вызван метод required(), null считаeтся валидным
Expand Down
4 changes: 3 additions & 1 deletion app/src/test/java/hexlet/code/TestStringSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ public class TestStringSchema {
private static final int WRONG_LENGTH = 25;
private static final int RIGHT_LENGTH = 5;
private StringSchema schema;
private Validator validator;

@BeforeEach
public void beforeEach() {
schema = Validator.string();
validator = new Validator();
schema = validator.string();
}

// Пока не вызван метод required(), null и пустая строка считаются валидным
Expand Down

0 comments on commit 1f574c1

Please sign in to comment.