-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+Added tests +IXProject.GetFullPath(string relative) - Makes full path using path to this project as the base.
- Loading branch information
Showing
9 changed files
with
121 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,36 @@ | ||
using System.Collections.Generic; | ||
using net.r_eg.MvsSln.Extensions; | ||
using Xunit; | ||
|
||
namespace MvsSlnTest.Extensions | ||
{ | ||
public class ObjectExtensionTest | ||
{ | ||
[Fact] | ||
public void EReturnTest1() | ||
{ | ||
string data = "12345 "; | ||
Assert.Equal(data, data.E(s => s.Trim())); | ||
|
||
void _upd(ref string input) => input = "9876"; | ||
Assert.Equal(data, data.E(s => _upd(ref s))); | ||
|
||
const int _V = 14; | ||
var obj = new List<int>(1) { _V }; | ||
Assert.NotEqual(_V, obj.E(v => v[0] = 8)[0]); | ||
} | ||
|
||
[Fact] | ||
public void EActTest1() | ||
{ | ||
var x = new List<int>(1) { 0 }; | ||
Assert.Equal(1, x.E(() => x[0]++)[0]); | ||
|
||
var y = new List<int>(1) { 0 }; | ||
Assert.Equal(0, y.E(() => x[0]++)[0]); | ||
|
||
var z = new List<int>(1) { 0 }; | ||
Assert.Equal(3, x.E(_x => _x[0]++)[0]); | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
MvsSlnTest/resources/ProjectDependenciesXml/onlypath/ClassLibrary1.csproj
This file contains 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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<ProjectReference Include="ClassLibrary2.csproj" /> | ||
</ItemGroup> | ||
</Project> |
3 changes: 3 additions & 0 deletions
3
MvsSlnTest/resources/ProjectDependenciesXml/onlypath/ClassLibrary2.csproj
This file contains 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,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
</Project> |
31 changes: 31 additions & 0 deletions
31
MvsSlnTest/resources/ProjectDependenciesXml/onlypath/test.sln
This file contains 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,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30011.22 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary2", "ClassLibrary2.csproj", "{64AD76CA-2C85-4039-B0B3-734CF02B2999}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1.csproj", "{6CE57BB1-4A6D-4714-B775-74A3637EC992}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{64AD76CA-2C85-4039-B0B3-734CF02B2999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{64AD76CA-2C85-4039-B0B3-734CF02B2999}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{64AD76CA-2C85-4039-B0B3-734CF02B2999}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{64AD76CA-2C85-4039-B0B3-734CF02B2999}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{6CE57BB1-4A6D-4714-B775-74A3637EC992}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6CE57BB1-4A6D-4714-B775-74A3637EC992}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6CE57BB1-4A6D-4714-B775-74A3637EC992}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6CE57BB1-4A6D-4714-B775-74A3637EC992}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {94B06088-79E0-4DE6-9D42-064E4841E9D9} | ||
EndGlobalSection | ||
EndGlobal |