-
Notifications
You must be signed in to change notification settings - Fork 0
Sprint_6 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
melkolan
wants to merge
3
commits into
main
Choose a base branch
from
develop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sprint_6 #5
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
37 changes: 37 additions & 0 deletions
37
src/test/java/com/example/AnimalFoodParameterizedTest.java
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| package com.example; | ||
|
|
||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.junit.runners.Parameterized; | ||
|
|
||
| import java.util.Arrays; | ||
| import java.util.Collection; | ||
| import java.util.List; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
|
|
||
| @RunWith(Parameterized.class) | ||
| public class AnimalFoodParameterizedTest { | ||
|
|
||
| private final String animalKind; | ||
| private final List<String> expectedFood; | ||
|
|
||
| public AnimalFoodParameterizedTest(String animalKind, List<String> expectedFood) { | ||
| this.animalKind = animalKind; | ||
| this.expectedFood = expectedFood; | ||
| } | ||
|
|
||
| @Parameterized.Parameters(name = "{index}: kind={0}") | ||
| public static Collection<Object[]> data() { | ||
| return Arrays.asList(new Object[][]{ | ||
| {"Травоядное", List.of("Трава", "Различные растения")}, | ||
| {"Хищник", List.of("Животные", "Птицы", "Рыба")} | ||
| }); | ||
| } | ||
|
|
||
| @Test | ||
| public void getFoodShouldReturnExpectedFood() throws Exception { | ||
| Animal animal = new Animal(); | ||
| assertEquals(expectedFood, animal.getFood(animalKind)); | ||
| } | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| package com.example; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
| import static org.junit.Assert.fail; | ||
|
|
||
| public class AnimalTest { | ||
|
|
||
| @Test | ||
| public void getFoodShouldThrowForUnknownAnimalKind() { | ||
| Animal animal = new Animal(); | ||
|
|
||
| try { | ||
| animal.getFood("Неизвестно"); | ||
| fail("Expected exception"); | ||
| } catch (Exception e) { | ||
| assertEquals( | ||
| "Неизвестный вид животного, используйте значение Травоядное или Хищник", | ||
| e.getMessage() | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| public void getFamilyShouldReturnAllFamilies() { | ||
| Animal animal = new Animal(); | ||
|
|
||
| assertEquals( | ||
| "Существует несколько семейств: заячьи, беличьи, мышиные, кошачьи, псовые, медвежьи, куньи", | ||
| animal.getFamily() | ||
| ); | ||
| } | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package com.example; | ||
|
|
||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.mockito.Mock; | ||
| import org.mockito.junit.MockitoJUnitRunner; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import static org.junit.Assert.*; | ||
| import static org.mockito.Mockito.*; | ||
|
|
||
| @RunWith(MockitoJUnitRunner.class) | ||
| public class CatTest { | ||
|
|
||
| @Mock | ||
| private Feline feline; | ||
|
|
||
| @Test | ||
| public void getSoundShouldReturnMeow() { | ||
| Cat cat = new Cat(feline); | ||
| assertEquals("Мяу", cat.getSound()); | ||
| } | ||
|
|
||
| @Test | ||
| public void getFoodShouldDelegateToPredator() throws Exception { | ||
| when(feline.eatMeat()).thenReturn(List.of("Животные", "Птицы", "Рыба")); | ||
|
|
||
| Cat cat = new Cat(feline); | ||
| List<String> food = cat.getFood(); | ||
|
|
||
| assertEquals(List.of("Животные", "Птицы", "Рыба"), food); | ||
| verify(feline, times(1)).eatMeat(); | ||
| } | ||
|
|
||
| @Test | ||
| public void getFoodShouldThrowWhenPredatorThrows() throws Exception { | ||
| when(feline.eatMeat()).thenThrow(new Exception("boom")); | ||
|
|
||
| Cat cat = new Cat(feline); | ||
|
|
||
| try { | ||
| cat.getFood(); | ||
| fail("Expected exception"); | ||
| } catch (Exception e) { | ||
| assertEquals("boom", e.getMessage()); | ||
| } | ||
|
|
||
| verify(feline, times(1)).eatMeat(); | ||
| } | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package com.example; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
|
|
||
| public class FelineTest { | ||
|
|
||
| @Test | ||
| public void eatMeatShouldReturnPredatorFood() throws Exception { | ||
| Feline feline = new Feline(); | ||
| List<String> actual = feline.eatMeat(); | ||
| assertEquals(List.of("Животные", "Птицы", "Рыба"), actual); | ||
| } | ||
|
|
||
| @Test | ||
| public void getFamilyShouldReturnCatsFamily() { | ||
| Feline feline = new Feline(); | ||
| assertEquals("Кошачьи", feline.getFamily()); | ||
| } | ||
|
|
||
| @Test | ||
| public void getKittensWithoutArgsShouldReturnOne() { | ||
| Feline feline = new Feline(); | ||
| assertEquals(1, feline.getKittens()); | ||
| } | ||
|
|
||
| @Test | ||
| public void getKittensWithArgsShouldReturnProvidedCount() { | ||
| Feline feline = new Feline(); | ||
| assertEquals(5, feline.getKittens(5)); | ||
| } | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.example; | ||
|
|
||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.junit.runners.Parameterized; | ||
|
|
||
| import java.util.Arrays; | ||
| import java.util.Collection; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
| import static org.mockito.Mockito.mock; | ||
|
|
||
| @RunWith(Parameterized.class) | ||
| public class LionSexParameterizedTest { | ||
|
|
||
| private final String sex; | ||
| private final boolean expectedHasMane; | ||
|
|
||
| public LionSexParameterizedTest(String sex, boolean expectedHasMane) { | ||
| this.sex = sex; | ||
| this.expectedHasMane = expectedHasMane; | ||
| } | ||
|
|
||
| @Parameterized.Parameters(name = "{index}: sex={0} -> mane={1}") | ||
| public static Collection<Object[]> data() { | ||
| return Arrays.asList(new Object[][]{ | ||
| {"Самец", true}, | ||
| {"Самка", false} | ||
| }); | ||
| } | ||
|
|
||
| @Test | ||
| public void doesHaveManeShouldMatchSex() throws Exception { | ||
| Feline feline = mock(Feline.class); | ||
| Lion lion = new Lion(sex, feline); | ||
| assertEquals(expectedHasMane, lion.doesHaveMane()); | ||
| } | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package com.example; | ||
|
|
||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.mockito.Mock; | ||
| import org.mockito.junit.MockitoJUnitRunner; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import static org.junit.Assert.*; | ||
| import static org.mockito.Mockito.*; | ||
|
|
||
| @RunWith(MockitoJUnitRunner.class) | ||
| public class LionTest { | ||
|
|
||
| @Mock | ||
| private Feline feline; | ||
|
|
||
| @Test | ||
| public void constructorShouldThrowForUnknownSex() { | ||
| try { | ||
| new Lion("Неизвестно", feline); | ||
| fail("Expected exception"); | ||
| } catch (Exception e) { | ||
| assertEquals("Используйте допустимые значения пола животного - самец или самка", e.getMessage()); | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| public void getKittensShouldDelegateToFeline() throws Exception { | ||
| when(feline.getKittens()).thenReturn(3); | ||
|
|
||
| Lion lion = new Lion("Самец", feline); | ||
| int kittens = lion.getKittens(); | ||
|
|
||
| assertEquals(3, kittens); | ||
| verify(feline, times(1)).getKittens(); | ||
| } | ||
|
|
||
| @Test | ||
| public void getFoodShouldDelegateToFeline() throws Exception { | ||
| when(feline.getFood("Хищник")).thenReturn(List.of("Животные", "Птицы", "Рыба")); | ||
|
|
||
| Lion lion = new Lion("Самка", feline); | ||
| List<String> food = lion.getFood(); | ||
|
|
||
| assertEquals(List.of("Животные", "Птицы", "Рыба"), food); | ||
| verify(feline, times(1)).getFood("Хищник"); | ||
| } | ||
| } | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ru"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Animal</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">untitled</a> > <a href="index.html" class="el_package">com.example</a> > <span class="el_class">Animal</span></div><h1>Animal</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 27</td><td class="ctr2">100 %</td><td class="bar">0 of 4</td><td class="ctr2">100 %</td><td class="ctr1">0</td><td class="ctr2">5</td><td class="ctr1">0</td><td class="ctr2">7</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a2"><a href="Animal.java.html#L8" class="el_method">getFood(String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="22" alt="22"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100 %</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">5</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="Animal.java.html#L5" class="el_method">Animal()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="16" height="10" title="3" alt="3"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="Animal.java.html#L18" class="el_method">getFamily()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="10" height="10" title="2" alt="2"/></td><td class="ctr2" id="c2">100 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html> |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ru"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Animal.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">untitled</a> > <a href="index.source.html" class="el_package">com.example</a> > <span class="el_source">Animal.java</span></div><h1>Animal.java</h1><pre class="source lang-java linenums">package com.example; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| <span class="fc" id="L5">public class Animal {</span> | ||
|
|
||
| public List<String> getFood(String animalKind) throws Exception { | ||
| <span class="fc bfc" id="L8" title="All 2 branches covered."> if ("Травоядное".equals(animalKind)) {</span> | ||
| <span class="fc" id="L9"> return List.of("Трава", "Различные растения");</span> | ||
| <span class="fc bfc" id="L10" title="All 2 branches covered."> } else if ("Хищник".equals(animalKind)) {</span> | ||
| <span class="fc" id="L11"> return List.of("Животные", "Птицы", "Рыба");</span> | ||
| } else { | ||
| <span class="fc" id="L13"> throw new Exception("Неизвестный вид животного, используйте значение Травоядное или Хищник");</span> | ||
| } | ||
| } | ||
|
|
||
| public String getFamily() { | ||
| <span class="fc" id="L18"> return "Существует несколько семейств: заячьи, беличьи, мышиные, кошачьи, псовые, медвежьи, куньи";</span> | ||
| } | ||
| } | ||
| </pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html> |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="ru"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Cat</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">untitled</a> > <a href="index.html" class="el_package">com.example</a> > <span class="el_class">Cat</span></div><h1>Cat</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 12</td><td class="ctr2">100 %</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">5</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a0"><a href="Cat.java.html#L9" class="el_method">Cat(Feline)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="c0">100 %</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="Cat.java.html#L18" class="el_method">getFood()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="80" height="10" title="4" alt="4"/></td><td class="ctr2" id="c1">100 %</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="Cat.java.html#L14" class="el_method">getSound()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="40" height="10" title="2" alt="2"/></td><td class="ctr2" id="c2">100 %</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это нужно доработать:
для юнит-тестов применяется подход: один тест - одна проверка. В этом тесте две проверки, нужно оставить одну проверку.
В коде в нескольких местах есть по несколько проверок