-
Notifications
You must be signed in to change notification settings - Fork 23
Dmitrij balabanov #55
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
NeksWTF
wants to merge
10
commits into
ISUCT:Dmitrij_Balabanov
Choose a base branch
from
NeksWTF:Dmitrij_Balabanov
base: Dmitrij_Balabanov
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
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
278a83a
laba_2
NeksWTF 9969670
Added stylecop for project
jskonst c4a7f5d
Added stylecop for project
jskonst 9ec9283
Laba_3_and_4
NeksWTF d90b65c
Dmitrij_Balabanov
NeksWTF adcb175
Merge branch 'Dmitrij_Balabanov' into Dmitrij_Balabanov
NeksWTF c80d6d4
Labs
NeksWTF cee588e
Laba6
NeksWTF 83cf62c
Laba6-7
NeksWTF 1e8f5c3
Commit
NeksWTF 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netcoreapp2.2</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| <NoWarn>1573,1591,1701;1702;1705</NoWarn> | ||
| <IsPackable>false</IsPackable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | ||
| <PackageReference Include="xunit" Version="2.4.0" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
| <PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="all" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\CourseApp\CourseApp.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <CodeAnalysisRuleSet>../stylecop/stylecop.ruleset</CodeAnalysisRuleSet> | ||
| <GenerateFullPaths>true</GenerateFullPaths> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <AdditionalFiles Include="../stylecop/stylecop.json" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
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,64 @@ | ||
| using System; | ||
| using Xunit; | ||
| using CourseApp; | ||
|
|
||
| namespace CourseApp.Tests | ||
| { | ||
| public class UnitTest3 | ||
| { | ||
| [Fact] | ||
| public void Test12() | ||
| { | ||
| Cat murka = new Cat(); | ||
|
|
||
| Assert.Equal(15, murka.Age); | ||
| Assert.Equal(15.0f, murka.Weight); | ||
| Assert.Equal("K", murka.Pol); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test13() | ||
| { | ||
| Cat murka = new Cat("K"); | ||
| Assert.Equal(9, murka.Age); | ||
| Assert.Equal(10.0f, murka.Weight); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test14() | ||
| { | ||
| Cat murka = new Cat("Kisa"); | ||
| Assert.Equal(11, murka.Age); | ||
| Assert.Equal(12.0f, murka.Weight); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test15() | ||
| { | ||
| Cat murka = new Cat(); | ||
| Assert.Equal( | ||
| @" | ||
| /\___/\ | ||
| ( o o ) | ||
| / * \ | ||
| \__\_/__/ meow! | ||
| / \ | ||
| / ___ \ | ||
| \/___\/", murka.Picture()); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test16() | ||
| { | ||
| Cat murka = new Cat(); | ||
| Assert.Equal($"��� �������� {15} ����� ����� ��� ", murka.Golos()); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test17() | ||
| { | ||
| Cat murka = new Cat(); | ||
| Assert.Equal("��� �������� 15 � ����� K", murka.ToString()); | ||
| } | ||
| } | ||
| } |
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,22 @@ | ||
| using System; | ||
| using Xunit; | ||
| using CourseApp; | ||
|
|
||
| namespace CourseApp.Tests | ||
| { | ||
| public class UnitTest4 | ||
| { | ||
| [Fact] | ||
| public void Test18() | ||
| { | ||
| Pet[] pet = new Pet[2]; | ||
| pet[0] = new Dog(); | ||
| pet[1] = new Cat(); | ||
| foreach (Pet i in pet) | ||
| { | ||
| Assert.Equal(15, i.Age); | ||
| Assert.Equal("K", i.Pol); | ||
| } | ||
| } | ||
| } | ||
| } |
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,30 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netcoreapp2.1</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| <NoWarn>1573,1591,1701;1702;1705</NoWarn> | ||
| <IsPackable>false</IsPackable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | ||
| <PackageReference Include="xunit" Version="2.4.0" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
| <PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="all" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\CourseApp\CourseApp.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <CodeAnalysisRuleSet>../stylecop/stylecop.ruleset</CodeAnalysisRuleSet> | ||
| <GenerateFullPaths>true</GenerateFullPaths> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <AdditionalFiles Include="../stylecop/stylecop.json" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
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,25 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 15 | ||
| VisualStudioVersion = 15.0.28010.2046 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp.tests", "CourseApp.tests.csproj", "{7C6DFAA2-D1B0-4FB1-9E13-D5BF17CC1FC8}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {7C6DFAA2-D1B0-4FB1-9E13-D5BF17CC1FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {7C6DFAA2-D1B0-4FB1-9E13-D5BF17CC1FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {7C6DFAA2-D1B0-4FB1-9E13-D5BF17CC1FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {7C6DFAA2-D1B0-4FB1-9E13-D5BF17CC1FC8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {BA49A447-8DDA-4475-92B3-216B217CA049} | ||
| EndGlobalSection | ||
| EndGlobal |
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,44 @@ | ||
| using System; | ||
| using CourseApp; | ||
| using Xunit; | ||
|
|
||
| namespace CourseApp.Tests | ||
| { | ||
| public class UnitTest1 | ||
| { | ||
| [Fact] | ||
| public void Test1() | ||
| { | ||
| var res = Program.Prgrm(0.0, 0.0f, 0.0f); | ||
| Assert.Equal(double.NaN, res, 3); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test2() | ||
| { | ||
| var res = Program.Prgrm(0.0, 0.0f, 2.0f); | ||
| Assert.Equal(double.NaN, res, 3); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test3() | ||
| { | ||
| var res = Program.Prgrm(1.0, 2.0f, 0.0f); | ||
| Assert.Equal(-0.898, res, 3); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test4() | ||
| { | ||
| var res = Program.Prgrm(2.0, 0.0f, 0.0f); | ||
| Assert.Equal(double.NaN, res, 3); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test5() | ||
| { | ||
| var res = Program.Prgrm(0.0, 0.0f, 1.5f); | ||
| Assert.Equal(double.NaN, res, 3); | ||
| } | ||
| } | ||
| } | ||
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,60 @@ | ||
| using System; | ||
| using Xunit; | ||
| using CourseApp; | ||
|
|
||
| namespace CourseApp.Tests | ||
| { | ||
| public class UnitTest2 | ||
| { | ||
| [Fact] | ||
| public void Test6() | ||
| { | ||
| Dog snech = new Dog(); | ||
|
|
||
| Assert.Equal(15, snech.Age); | ||
| Assert.Equal(50.0f, snech.Weight); | ||
| Assert.Equal("K", snech.Pol); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test7() | ||
| { | ||
| Dog snech = new Dog("S"); | ||
| Assert.Equal(12, snech.Age); | ||
| Assert.Equal(45.0f, snech.Weight); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test8() | ||
| { | ||
| Dog snech = new Dog("K"); | ||
| Assert.Equal(14, snech.Age); | ||
| Assert.Equal(50.0f, snech.Weight); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test9() | ||
| { | ||
| Dog snech = new Dog(); | ||
| Assert.Equal( | ||
| @" __ _ | ||
| o'')}____// | ||
| `_/ ) | ||
| (_(_/-(_/", snech.Picture()); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test10() | ||
| { | ||
| Dog snech = new Dog(); | ||
| Assert.Equal($"������ �������� {15} ������ ����� ���-��� ", snech.Golos()); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void Test11() | ||
| { | ||
| Dog snech = new Dog(); | ||
| Assert.Equal("������ �������� 15 � ����� K", snech.ToString()); | ||
| } | ||
| } | ||
| } |
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
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.
Переименуйте и файли каждый тест - чтобы было понятно - что за метод тестируется и что ожидать