-
Notifications
You must be signed in to change notification settings - Fork 38
dz #29
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
Kislota1
wants to merge
3
commits into
ISUCT:Oleg_Larin
Choose a base branch
from
Kislota1:Oleg_Larin
base: Oleg_Larin
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
dz #29
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,29 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netcoreapp2.1</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| <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.1.118" 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> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>netcoreapp2.1</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| <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.1.118" 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 was deleted.
Oops, something went wrong.
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,69 @@ | ||
| using System; | ||
| using Xunit; | ||
| using EmployeeClass; | ||
| using System.Threading; | ||
|
|
||
| namespace TestEmployee | ||
| { | ||
| public class TestEmployee | ||
| { | ||
| [Fact] | ||
| public void timeSpentFromGettingAJob_return2Seconds() | ||
| { | ||
| Employee emp = new Employee(); | ||
|
|
||
| Thread.Sleep(2000); | ||
|
|
||
| TimeSpan totalSeconds = emp.timeSpentFromGettingJob(); | ||
|
|
||
| double res = Math.Round(totalSeconds.TotalSeconds); | ||
|
|
||
| int seconds = 2; | ||
|
|
||
| Assert.Equal(seconds, res); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void getJob_returns_Lvl1_2_3() | ||
| { | ||
| Employee emp = new Employee(); | ||
|
|
||
| string res = emp.getJob(); | ||
|
|
||
| if(res == "Lvl 1") | ||
| { | ||
| Assert.Equal(res, "Lvl 1"); | ||
| } | ||
| else if(res == "Lvl 2") | ||
| { | ||
| Assert.Equal(res, "Lvl 2"); | ||
| } | ||
| else | ||
| { | ||
| Assert.Equal(res, "Lvl 3"); | ||
| } | ||
| } | ||
|
|
||
| [Fact] | ||
| public void getSalery_returns_1000_2000_3000() | ||
| { | ||
| Employee emp = new Employee(); | ||
|
|
||
| int res = emp.getSalary(); | ||
|
|
||
| if(emp.job == "Lvl 1") | ||
| { | ||
| Assert.Equal(1000, res); | ||
| } | ||
| else if(emp.job == "Lvl 2") | ||
| { | ||
| Assert.Equal(2000, res); | ||
| } | ||
| else | ||
| { | ||
| Assert.Equal(3000, res); | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
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,42 @@ | ||
| using System; | ||
| using Xunit; | ||
| using Formula; | ||
|
|
||
| namespace TestFormula | ||
| { | ||
| public class TestFormula | ||
| { | ||
| [Theory] | ||
| [InlineData(1.2,5.2,0.8,4.1,2.7)] | ||
| public void TestFormulaA(double xb, double xe, double dx, double a, double b) | ||
| { | ||
| Formula13 f = new Formula13(); | ||
|
|
||
| double[] f_res = new double[5] { -5.988041709469331, 1, 20.10917011949253, 13.56786626062469, 11.505040323579745 }; | ||
|
|
||
| double[] res = f.countFormulaA(xb, xe, dx, a, b); | ||
|
|
||
| for (int i = 0; i < res.Length; i++) | ||
| { | ||
| Assert.Equal(res[i], f_res[i]); | ||
| } | ||
| } | ||
|
|
||
| [Theory] | ||
| [InlineData(4.1,2.7)] | ||
| public void TestFormulaB(double a, double b) | ||
| { | ||
| Formula13 f = new Formula13(); | ||
|
|
||
| double[] x_nums = new double[5] { 1.9, 2.15, 2.34, 2.73, 3.16 }; | ||
| double[] f_res = new double[5] { -99.97670497061331, 77.88791023801342, 38.122692372591594, 21.380274597107814, 16.020495497448806 }; | ||
|
|
||
| double[] res = f.countFormulaB(x_nums, a, b); | ||
|
|
||
| for (int i = 0; i < res.Length; i++) | ||
| { | ||
| Assert.Equal(res[i], f_res[i]); | ||
| } | ||
| } | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| { | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": ".NET Core Launch (console)", | ||
| "type": "coreclr", | ||
| "request": "launch", | ||
| "preLaunchTask": "build", | ||
| "program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/CourseApp.dll", | ||
| "args": [], | ||
| "cwd": "${workspaceFolder}", | ||
| "console": "internalConsole", | ||
| "stopAtEntry": false | ||
| }, | ||
| { | ||
| "name": ".NET Core Attach", | ||
| "type": "coreclr", | ||
| "request": "attach", | ||
| "processId": "${command:pickProcess}" | ||
| } | ||
| ] | ||
| { | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": ".NET Core Launch (console)", | ||
| "type": "coreclr", | ||
| "request": "launch", | ||
| "preLaunchTask": "build", | ||
| "program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/CourseApp.dll", | ||
| "args": [], | ||
| "cwd": "${workspaceFolder}", | ||
| "console": "internalConsole", | ||
| "stopAtEntry": false | ||
| }, | ||
| { | ||
| "name": ".NET Core Attach", | ||
| "type": "coreclr", | ||
| "request": "attach", | ||
| "processId": "${command:pickProcess}" | ||
| } | ||
| ] | ||
| } |
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 |
|---|---|---|
| @@ -1,42 +1,42 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "build", | ||
| "command": "dotnet", | ||
| "type": "process", | ||
| "args": [ | ||
| "build", | ||
| "${workspaceFolder}/CourseApp.csproj", | ||
| "/property:GenerateFullPaths=true", | ||
| "/consoleloggerparameters:NoSummary" | ||
| ], | ||
| "problemMatcher": "$msCompile" | ||
| }, | ||
| { | ||
| "label": "publish", | ||
| "command": "dotnet", | ||
| "type": "process", | ||
| "args": [ | ||
| "publish", | ||
| "${workspaceFolder}/CourseApp.csproj", | ||
| "/property:GenerateFullPaths=true", | ||
| "/consoleloggerparameters:NoSummary" | ||
| ], | ||
| "problemMatcher": "$msCompile" | ||
| }, | ||
| { | ||
| "label": "watch", | ||
| "command": "dotnet", | ||
| "type": "process", | ||
| "args": [ | ||
| "watch", | ||
| "run", | ||
| "${workspaceFolder}/CourseApp.csproj", | ||
| "/property:GenerateFullPaths=true", | ||
| "/consoleloggerparameters:NoSummary" | ||
| ], | ||
| "problemMatcher": "$msCompile" | ||
| } | ||
| ] | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "build", | ||
| "command": "dotnet", | ||
| "type": "process", | ||
| "args": [ | ||
| "build", | ||
| "${workspaceFolder}/CourseApp.csproj", | ||
| "/property:GenerateFullPaths=true", | ||
| "/consoleloggerparameters:NoSummary" | ||
| ], | ||
| "problemMatcher": "$msCompile" | ||
| }, | ||
| { | ||
| "label": "publish", | ||
| "command": "dotnet", | ||
| "type": "process", | ||
| "args": [ | ||
| "publish", | ||
| "${workspaceFolder}/CourseApp.csproj", | ||
| "/property:GenerateFullPaths=true", | ||
| "/consoleloggerparameters:NoSummary" | ||
| ], | ||
| "problemMatcher": "$msCompile" | ||
| }, | ||
| { | ||
| "label": "watch", | ||
| "command": "dotnet", | ||
| "type": "process", | ||
| "args": [ | ||
| "watch", | ||
| "run", | ||
| "${workspaceFolder}/CourseApp.csproj", | ||
| "/property:GenerateFullPaths=true", | ||
| "/consoleloggerparameters:NoSummary" | ||
| ], | ||
| "problemMatcher": "$msCompile" | ||
| } | ||
| ] | ||
| } |
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 |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>netcoreapp2.1</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <CodeAnalysisRuleSet>../_stylecop/stylecop.ruleset</CodeAnalysisRuleSet> | ||
| <GenerateFullPaths>true</GenerateFullPaths> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <AdditionalFiles Include="../_stylecop/stylecop.json" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>netcoreapp2.1</TargetFramework> | ||
| <TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" /> | ||
| </ItemGroup> | ||
| <PropertyGroup> | ||
| <CodeAnalysisRuleSet>../_stylecop/stylecop.ruleset</CodeAnalysisRuleSet> | ||
| <GenerateFullPaths>true</GenerateFullPaths> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <AdditionalFiles Include="../_stylecop/stylecop.json" /> | ||
| </ItemGroup> | ||
| </Project> |
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.
why this file shown as changed?
configure you gitattributes to fit lineendings