├── .gitattributes ├── .gitignore ├── Blockchain ├── block.js └── dev-test.js ├── BugRepro ├── MSTestUnitTestProject2 │ ├── MSTestUnitTest1.cs │ ├── MSTestUnitTestProject2.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── NUnitTestProject1 │ ├── NUnitTestClass.cs │ ├── NUnitTestProject1.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── UnitTestProject1.sln ├── readme.md ├── t.bat ├── t.runsettings └── xUnitTestProject3 │ ├── Properties │ └── AssemblyInfo.cs │ ├── packages.config │ ├── xUnitTest1.cs │ └── xUnitTestProject3.csproj ├── Constraints ├── Readme.md ├── pom.xml └── src │ └── main │ └── java │ ├── IConstraint.java │ ├── add.java │ ├── cf.java │ ├── constant.java │ ├── multiply.java │ ├── tap.java │ └── variable.java ├── DataDrivenTests ├── DataDrivenTests.sln ├── DataDrivenTests │ ├── CustomDataDrivenTest.cs │ ├── DataDrivenTests.csproj │ ├── DynamicDataDrivenTest.cs │ ├── InlineDataDrivenTest.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config └── README.md ├── FlakyTests ├── AppCode │ ├── AppCode.csproj │ ├── Class1.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── AppTestProject1 │ ├── AppTestProject1.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UnitTest1.cs │ └── packages.config └── FlakyTests.sln ├── InAssemblyParallel ├── ClassLibrary1 │ ├── Class1.cs │ ├── ClassLibrary1.csproj │ └── Properties │ │ └── AssemblyInfo.cs ├── UTA1 │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UTA1.csproj │ ├── UnitTest1.cs │ └── packages.config ├── UTA2 │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UTA2.csproj │ ├── UnitTest1.cs │ └── packages.config ├── UTA3 │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UTA3.csproj │ ├── UnitTest1.cs │ └── packages.config ├── UTA4 │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UTA4.csproj │ ├── UnitTest1.cs │ └── packages.config ├── image.jpg ├── inassemblyparallel.sln ├── readme.md └── test.runsettings ├── IntelliTest ├── PathCoverage │ ├── PathCoverage.sln │ ├── PathCoverage │ │ ├── PathCoverage.cs │ │ ├── PathCoverage.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── readme.md ├── SimpleBank │ ├── SimpleBank.sln │ ├── SimpleBank │ │ ├── Data │ │ │ ├── AccountRepository.cs │ │ │ └── OperationRepository.cs │ │ ├── Domain │ │ │ ├── Account.cs │ │ │ ├── Direction.cs │ │ │ ├── Employee.cs │ │ │ └── Operation.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Repository │ │ │ ├── IAccountRepository.cs │ │ │ └── IOperationRepository.cs │ │ ├── Services │ │ │ ├── AccountService.cs │ │ │ ├── AccountServiceException.cs │ │ │ └── EmployeeServices.cs │ │ └── SimpleBank.csproj │ └── readme.md ├── Taxation │ ├── DAL │ │ ├── DAL.cs │ │ ├── DAL.csproj │ │ ├── IDAL.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Models │ │ ├── Employee.cs │ │ ├── House.cs │ │ ├── InvalidLocationException.cs │ │ ├── InvalidRentException.cs │ │ ├── Location.cs │ │ ├── Models.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── README.md │ ├── TaxCalculators │ │ ├── Calculators │ │ │ ├── HRAexemptionCalculator.cs │ │ │ └── ITaxCalculator.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── TaxCalculator.cs │ │ ├── TaxCalculators.csproj │ │ └── TaxRecord.cs │ └── Taxation.sln ├── readme.md └── references.md ├── MSTestV2Ex └── AttributeEx │ ├── AttributeEx.sln │ ├── AttributeEx │ ├── AttributeEx.csproj │ ├── NoteAttribute.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SmokeTestAttribute.cs │ └── packages.config │ └── AttributeExTests │ ├── AttributeExTests.csproj │ ├── Properties │ └── AssemblyInfo.cs │ ├── UnitTest1.cs │ ├── obj │ └── Release │ │ └── AttributeExTests.csproj.CoreCompileInputs.cache │ └── packages.config ├── Math ├── Math.sln ├── Mathlib │ ├── Class1.cs │ ├── Mathlib.csproj │ └── Properties │ │ └── AssemblyInfo.cs └── MathlibTests │ ├── MathlibTests.csproj │ ├── Properties │ └── AssemblyInfo.cs │ ├── UnitTest1.cs │ └── packages.config ├── MemberAccess ├── Sample1 │ ├── Sample1.sln │ ├── Sample1 │ │ ├── Bar.cs │ │ ├── Foo.cs │ │ ├── Gotcha.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample1.csproj │ ├── Sample1Tests │ │ ├── FooTests.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Sample1Tests.csproj │ │ └── packages.config │ └── readme.md ├── Sample2 │ ├── Sample2.sln │ ├── Sample2 │ │ ├── Bar.cs │ │ ├── Foo.cs │ │ ├── Gotcha.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Sample2.csproj │ ├── Sample2Tests │ │ ├── FooTests.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Sample2Tests.csproj │ │ └── packages.config │ └── readme.md └── Sample3 │ ├── Sample3.sln │ ├── Sample3 │ ├── Bar.cs │ ├── Foo.cs │ ├── Gotcha.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Sample3.csproj │ ├── Sample3Tests │ ├── FooTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Sample3Tests.csproj │ └── packages.config │ └── readme.md ├── NUnit.Tests5 ├── NUnit.Tests5.sln └── NUnit.Tests5 │ ├── NUnit.Tests5.csproj │ ├── Properties │ └── AssemblyInfo.cs │ ├── TestClass.cs │ └── packages.config ├── NUnit39 ├── 1.runsettings ├── ClassLibrary1 │ ├── Class1.cs │ ├── ClassLibrary1.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── op.cs ├── NUnit39.sln ├── NUnit39 │ ├── NUnit39.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── TestClass.cs │ ├── TestClass2.cs │ └── packages.config ├── OutOfProcDataCollector │ ├── OutOfProcDataCollector.csproj │ ├── SampleDataCollector.cs │ ├── bin │ │ └── Debug │ │ │ └── netcoreapp2.0 │ │ │ └── OutOfProcDataCollector.deps.json │ └── obj │ │ ├── Debug │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── net451 │ │ │ ├── OutOfProcDataCollector.AssemblyInfo.cs │ │ │ ├── OutOfProcDataCollector.csproj.CopyComplete │ │ │ ├── OutOfProcDataCollector.csproj.FileListAbsolute.txt │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ └── netcoreapp2.0 │ │ │ ├── OutOfProcDataCollector.AssemblyInfo.cs │ │ │ ├── OutOfProcDataCollector.csproj.CopyComplete │ │ │ └── OutOfProcDataCollector.csproj.FileListAbsolute.txt │ │ ├── OutOfProcDataCollector.csproj.nuget.g.props │ │ ├── OutOfProcDataCollector.csproj.nuget.g.targets │ │ └── project.assets.json └── readme.md ├── NUnitTests ├── NUnit2x │ ├── NUnit2x.sln │ ├── NUnit2x │ │ ├── Class1.cs │ │ ├── Class2.cs │ │ ├── NUnit2x.csproj │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── NUnit2xTests │ │ ├── Class1Tests.cs │ │ ├── Class2Tests.cs │ │ ├── NUnit2xTests.csproj │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── packages.config └── NUnit3x │ ├── NUnit3x.sln │ ├── NUnit3x │ ├── Class1.cs │ ├── Class2.cs │ ├── NUnit3x.csproj │ └── Properties │ │ └── AssemblyInfo.cs │ ├── NUnit3xTests │ ├── Class1Tests.cs │ ├── NUnit3xTests.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config │ └── readme.md ├── NetCoreSampleForCC ├── MSTestV2TestProject │ ├── AddTests.cs │ ├── MSTestV2TestProject.csproj │ └── obj │ │ └── project.assets.json ├── NUnit3TestProject │ ├── NUnit3TestProject.csproj │ └── SubTests.cs ├── NetCoreSampleForCC.sln ├── NetCoreSampleForCC │ ├── Add.cs │ ├── MathLib.csproj │ ├── Multiply.cs │ └── Subtract.cs ├── readme.md └── xUnitTestProject │ ├── MultTests.cs │ ├── obj │ └── project.assets.json │ └── xUnitTestProject.csproj ├── README.md ├── Shapes ├── BuildDefinition.json ├── Shapes.sln ├── Shapes │ ├── Headers │ │ ├── 2DShapes │ │ │ ├── Circle.h │ │ │ ├── Rectangle.h │ │ │ ├── Square.h │ │ │ └── Triangle.h │ │ ├── 3DShapes │ │ │ ├── Cube.h │ │ │ ├── Cuboid.h │ │ │ ├── Sphere.h │ │ │ └── Tetrahedron.h │ │ ├── Position.h │ │ └── Shape.h │ ├── Shapes.vcxproj │ ├── Shapes.vcxproj.filters │ └── Src │ │ ├── 2DShapes │ │ ├── Circle.cpp │ │ ├── Rectangle.cpp │ │ ├── Square.cpp │ │ └── Triangle.cpp │ │ ├── 3DShapes │ │ ├── Cube.cpp │ │ ├── Cuboid.cpp │ │ ├── Sphere.cpp │ │ └── Tetrahedron.cpp │ │ ├── Main.cpp │ │ ├── Position.cpp │ │ └── Shape.cpp ├── ShapesTests │ ├── ShapesTests.vcxproj │ ├── ShapesTests.vcxproj.filters │ └── Src │ │ ├── 2DShapesTests │ │ ├── CircleTests.cpp │ │ ├── RectangleTests.cpp │ │ ├── SquareTests.cpp │ │ └── TriangleTests.cpp │ │ └── 3DShapesTests │ │ ├── CubeTests.cpp │ │ ├── CuboidTests.cpp │ │ ├── SphereTests.cpp │ │ └── TetrahedronTests.cpp └── TestImpact.xml ├── SimpleMath ├── SimpleMath.sln ├── SimpleMath │ ├── Add.cs │ ├── Div.cs │ ├── Mult.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleMath.csproj │ └── Sub.cs ├── SimpleMathAddTests │ ├── AddTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleMathAddTests.csproj │ └── packages.config ├── SimpleMathDivTests │ ├── DivTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleMathDivTests.csproj │ └── packages.config ├── SimpleMathMultTests │ ├── MultTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleMathMultTests.csproj │ └── packages.config ├── SimpleMathSubTests │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleMathSubTests.csproj │ ├── SubTests.cs │ └── packages.config └── readme.md ├── SplitCoverageFile ├── SplitCoverageFile.sln └── SplitCoverageFile │ ├── App.config │ ├── InvalidCoverageFileException.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Ref │ └── x64 │ │ └── Debug │ │ ├── Microsoft.VisualStudio.Coverage.Analysis.dll │ │ └── Microsoft.VisualStudio.Coverage.Interop.dll │ ├── SplitCovUtility.cs │ └── SplitCoverageFile.csproj ├── TIAonDatadrivenTests ├── Math │ ├── Adder.cs │ ├── App.config │ ├── Math.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Subtractor.cs ├── MathTests │ ├── AddTests.cs │ ├── DatadrivenAddTests.cs │ ├── DatadrivenSubTests.cs │ ├── MathTests.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SubTests.cs │ └── packages.config └── TIAonDatadrivenTests.sln ├── TIAsample ├── TIAsample.sln ├── TIAsample │ ├── Class1.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── TIAsample.csproj └── TIAsampleTest │ ├── Properties │ └── AssemblyInfo.cs │ ├── TIAsampleTest.csproj │ ├── UnitTest1.cs │ ├── obj │ └── Debug │ │ ├── TIAsampleTest.csproj.CopyComplete │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── packages.config ├── TimeoutSample ├── TimeoutSample.sln └── TimeoutSample │ ├── Properties │ └── AssemblyInfo.cs │ ├── TimeoutSample.csproj │ ├── UnitTest1.cs │ └── packages.config ├── UWP_UT_testproject ├── UWP_UT_testproject.sln └── UWP_UT_testproject │ ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png │ ├── Package.appxmanifest │ ├── Properties │ ├── AssemblyInfo.cs │ └── UnitTestApp.rd.xml │ ├── UWP_UT_testproject.csproj │ ├── UWP_UT_testproject_TemporaryKey.pfx │ ├── UnitTest.cs │ ├── UnitTestApp.xaml │ ├── UnitTestApp.xaml.cs │ └── bin │ └── x86 │ └── Debug │ └── AppX │ ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png │ └── WinMetadata │ └── Windows.winmd ├── Win10_IoT_Core ├── Content │ └── RPi3CircuitDiagram.jpg ├── LED_Test │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── LED_Test.csproj │ ├── LED_Test_TemporaryKey.pfx │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── UnitTestApp.rd.xml │ ├── UnitTest.cs │ ├── UnitTestApp.xaml │ └── UnitTestApp.xaml.cs ├── Win10_IoT_Core.sln ├── Win10_IoT_Core │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── LED.cs │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── Win10_IoT_Core.csproj │ ├── Win10_IoT_Core.csproj.user │ └── Win10_IoT_Core_TemporaryKey.pfx └── readme.md ├── java └── hw │ ├── build.gradle │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── src │ ├── main │ └── java │ │ └── Library.java │ └── test │ └── java │ └── LibraryTest.java └── maven ├── fix-styles.js ├── package.json ├── pom.xml └── src ├── main └── java │ ├── Add.java │ ├── App.java │ ├── Divide.java │ ├── Multiply.java │ └── Subtract.java └── test └── java ├── AddTest.java └── AppTest.java /Blockchain/block.js: -------------------------------------------------------------------------------- 1 | const SHA256 = require('crypto-js/sha256'); 2 | 3 | class Block { 4 | constructor(timestamp, lasthash, hash, data) { 5 | this.timestamp = timestamp; 6 | this.lasthash = lasthash; 7 | this.hash = hash; 8 | this.data = data; 9 | } 10 | 11 | toString() { 12 | return `Block - 13 | Timestamp: ${this.timestamp} 14 | Last Hash: ${this.lasthash.substring(0, 10)} 15 | Hash : ${this.hash.substring(0, 10)} 16 | Data : ${this.data}`; 17 | } 18 | 19 | static genesis() { 20 | return new this('Genesis time', '-----', 'f1r57-h45h', []); 21 | } 22 | 23 | static mineBlock(lastBlock, data) { 24 | const timestamp = Date.now(); 25 | const lastHash = lastBlock.hash; 26 | const hash = Block.hash(timestamp, lastHash, data); 27 | 28 | return new this(timestamp, lastHash, hash, data); 29 | } 30 | 31 | static hash(timestamp, lastHash, data) { 32 | return SHA256(`${timestamp}${lastHash}${data}`).toString(); 33 | } 34 | } 35 | 36 | module.exports = Block; -------------------------------------------------------------------------------- /Blockchain/dev-test.js: -------------------------------------------------------------------------------- 1 | const Block = require('./block'); 2 | 3 | const fooBlock = Block.mineBlock(Block.genesis(), 'foo'); 4 | console.log(fooBlock.toString()); -------------------------------------------------------------------------------- /BugRepro/MSTestUnitTestProject2/MSTestUnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace MSTestUnitTestProject2 5 | { 6 | [TestClass] 7 | public class UnitTest1 8 | { 9 | [TestMethod] 10 | public void TestMethod1() 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BugRepro/MSTestUnitTestProject2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("UnitTestProject2")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("UnitTestProject2")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("dcfe64f8-0714-4ad6-ad5b-4576429f553f")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /BugRepro/MSTestUnitTestProject2/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /BugRepro/NUnitTestProject1/NUnitTestClass.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace NUnitTestProject1 9 | { 10 | [TestFixture] 11 | public class TestClass 12 | { 13 | [Test] 14 | public void TestMethod() 15 | { 16 | // TODO: Add your test code here 17 | Assert.Pass("Your first passing test"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /BugRepro/NUnitTestProject1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("UnitTestProject1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("nunit.tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /BugRepro/NUnitTestProject1/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /BugRepro/readme.md: -------------------------------------------------------------------------------- 1 | ## Repro for NUnit3-vs-adapter [#519](https://github.com/nunit/nunit3-vs-adapter/issues/519) 2 | 3 | The sln contains 3 unit test projects (NUnit, MSTest, xUnit.net) which just 1 bolier plate test method in each. 4 | There is also a runsettings file with "UseVerifiableInstrumentation" set to False. 5 | 6 | ### Steps to repro 7 | #### Command line 8 | - Invoke 't.bat` 9 | 10 | #### VS IDE 11 | - set the runsettings file 12 | - build sln 13 | - select all tests from Test Explorer 14 | - invoke "Analyze Code Coverage for Selected Tests" from the Test Explorer. 15 | 16 | ### Expected 17 | All the runs as seen in `t.bat` must succeed. 18 | 19 | ### Actual 20 | Running the NUnit tests with the runsettings as the configuration causes a crash from both the command line and from within the VS IDE. 21 | It works in the case of the MSTest and xUnit based tests. 22 | -------------------------------------------------------------------------------- /BugRepro/t.bat: -------------------------------------------------------------------------------- 1 | vstest.console.exe NUnitTestProject1\bin\Debug\NUnitTestProject1.dll 2 | vstest.console.exe MSTestUnitTestProject2\bin\Debug\MSTestUnitTestProject2.dll 3 | vstest.console.exe xUnitTestProject3\bin\Debug\xUnitTestProject3.dll 4 | 5 | vstest.console.exe NUnitTestProject1\bin\Debug\NUnitTestProject1.dll /Settings:t.runsettings 6 | vstest.console.exe MSTestUnitTestProject2\bin\Debug\MSTestUnitTestProject2.dll /Settings:t.runsettings 7 | vstest.console.exe xUnitTestProject3\bin\Debug\xUnitTestProject3.dll /Settings:t.runsettings -------------------------------------------------------------------------------- /BugRepro/t.runsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | False 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /BugRepro/xUnitTestProject3/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("UnitTestProject3")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("UnitTestProject3")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9abbd6a9-5f95-442a-88db-3fc1ebf374a7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /BugRepro/xUnitTestProject3/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /BugRepro/xUnitTestProject3/xUnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Xunit; 4 | 5 | namespace xUnitTestProject3 6 | { 7 | public class UnitTest1 8 | { 9 | [Fact] 10 | public void TestMethod1() 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Constraints/Readme.md: -------------------------------------------------------------------------------- 1 | # Constraint programming 2 | This sample illustrates the implementation of constraints, common in CAD systems. Instsead of using a CAD assembly with constraints, it uses a temperature converter modelled as a circuit with constraints. Provide a value at either end of the circuit, and a result will get computed at the other end. The constraints propogate the computation of the results through the circuit. This is based on the article [Solving Constraints with J#](https://web.archive.org/web/20050409074523/http://msdn.microsoft.com:80/library/en-us/dv_vstechart/html/bjConstraints.asp) that appeeared in MSDN many years ago. 3 | 4 | # Build 5 | Use Maven to build. 6 | 7 | # Execute 8 | Use ```java cf``` to excute. 9 | -------------------------------------------------------------------------------- /Constraints/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | com.microsoft.tfs 6 | test-mvn 7 | 1.0.0 8 | 9 | 10 | junit 11 | junit 12 | 4.11 13 | test 14 | 15 | 16 | 17 | 18 | 19 | maven-compiler-plugin 20 | 3.2 21 | 22 | 1.6 23 | 1.6 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Constraints/src/main/java/IConstraint.java: -------------------------------------------------------------------------------- 1 | interface IConstraint 2 | { 3 | void valueChanged(); 4 | void reset(); 5 | } -------------------------------------------------------------------------------- /Constraints/src/main/java/add.java: -------------------------------------------------------------------------------- 1 | public class add implements IConstraint 2 | { 3 | private variable addend; 4 | private variable augend; 5 | private variable sum; 6 | 7 | public add(variable v1, variable v2, variable v3) 8 | { 9 | addend = v1; 10 | augend = v2; 11 | sum = v3; 12 | 13 | addend.connect(this); 14 | augend.connect(this); 15 | sum.connect(this); 16 | } 17 | 18 | public void valueChanged() 19 | { 20 | if (addend.has_value() && augend.has_value()) 21 | { 22 | sum.set_value(addend.get_value() + augend.get_value(), this); 23 | } 24 | else if (addend.has_value() && sum.has_value()) 25 | { 26 | augend.set_value(sum.get_value() - addend.get_value(), this); 27 | } 28 | else if (augend.has_value() && sum.has_value()) 29 | { 30 | addend.set_value(sum.get_value() - augend.get_value(), this); 31 | } 32 | } 33 | 34 | public void reset() 35 | { 36 | addend.reset(this); 37 | augend.reset(this); 38 | sum.reset(this); 39 | } 40 | } -------------------------------------------------------------------------------- /Constraints/src/main/java/cf.java: -------------------------------------------------------------------------------- 1 | public class cf 2 | { 3 | public static void cfconverter(variable c, variable f) 4 | { 5 | variable u = new variable(); tap tu = new tap(u, "tu"); 6 | variable k = new variable(); tap tk = new tap(k, "tk"); 7 | constant c1 = new constant(9, k); 8 | multiply m1 = new multiply(c, k, u); 9 | 10 | variable l = new variable(); tap tl = new tap(l, "tl"); 11 | constant c2 = new constant(5, l); 12 | 13 | variable v = new variable(); tap tv = new tap(v, "tv"); 14 | multiply m2 = new multiply(v, l, u); 15 | 16 | variable m = new variable(); tap tm = new tap(m, "tm"); 17 | constant c3 = new constant(32, m); 18 | add a = new add(v, m, f); 19 | } 20 | 21 | public static void main(String[] args) 22 | { 23 | variable c = new variable(); tap tc = new tap(c, "c"); 24 | 25 | variable f = new variable(); tap tf = new tap(f, "f"); 26 | 27 | cfconverter(c, f); 28 | 29 | c.set_value(100, null); 30 | c.reset(null); 31 | f.set_value(32, null); 32 | } 33 | } -------------------------------------------------------------------------------- /Constraints/src/main/java/constant.java: -------------------------------------------------------------------------------- 1 | public class constant implements IConstraint 2 | { 3 | public constant(double d, variable v) 4 | { 5 | v.connect(this); 6 | v.set_value(d, this); 7 | } 8 | 9 | public void valueChanged() 10 | { 11 | // no op 12 | } 13 | 14 | public void reset() 15 | { 16 | // no op 17 | } 18 | } -------------------------------------------------------------------------------- /Constraints/src/main/java/multiply.java: -------------------------------------------------------------------------------- 1 | public class multiply implements IConstraint 2 | { 3 | private variable multiplier; 4 | private variable multiplicand; 5 | private variable product; 6 | 7 | public multiply(variable v1, variable v2, variable v3) 8 | { 9 | multiplier = v1; 10 | multiplicand = v2; 11 | product = v3; 12 | 13 | multiplier.connect(this); 14 | multiplicand.connect(this); 15 | product.connect(this); 16 | } 17 | 18 | public void valueChanged() 19 | { 20 | if (multiplier.has_value() && multiplicand.has_value()) 21 | { 22 | product.set_value(multiplier.get_value() * multiplicand.get_value(), this); 23 | } 24 | else if (multiplier.has_value() && product.has_value()) 25 | { 26 | if (multiplier.get_value() == 0.0) 27 | { 28 | multiplicand.set_value(0.0, this); 29 | } 30 | else 31 | { 32 | multiplicand.set_value(product.get_value() / multiplier.get_value(), this); 33 | } 34 | } 35 | else if (multiplicand.has_value() && product.has_value()) 36 | { 37 | if (multiplicand.get_value() == 0) 38 | { 39 | multiplier.set_value(0.0, this); 40 | } 41 | else 42 | { 43 | multiplier.set_value(product.get_value() / multiplicand.get_value(), this); 44 | } 45 | } 46 | } 47 | 48 | public void reset() 49 | { 50 | multiplier.reset(this); 51 | multiplicand.reset(this); 52 | product.reset(this); 53 | } 54 | } -------------------------------------------------------------------------------- /Constraints/src/main/java/tap.java: -------------------------------------------------------------------------------- 1 | public class tap implements IConstraint 2 | { 3 | private variable val; 4 | private String name; 5 | 6 | public tap(variable v, String s) 7 | { 8 | val = v; 9 | name = s; 10 | 11 | val.connect(this); 12 | } 13 | 14 | public void valueChanged() 15 | { 16 | System.out.println(name + ": " + val.get_value()); 17 | } 18 | 19 | public void reset() 20 | { 21 | System.out.println(name + ": " + val.get_value()); 22 | } 23 | } -------------------------------------------------------------------------------- /Constraints/src/main/java/variable.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | 3 | public class variable 4 | { 5 | private boolean hasValue; 6 | private double value; 7 | private ArrayList constraints; 8 | private IConstraint setter; 9 | 10 | public boolean has_value() 11 | { 12 | return hasValue; 13 | } 14 | 15 | public double get_value() 16 | { 17 | return value; 18 | } 19 | 20 | public void set_value(double d, IConstraint theConstraint) 21 | { 22 | value = d; 23 | hasValue = true; 24 | setter = theConstraint; 25 | 26 | for (int i = 0; i < constraints.size(); i++) 27 | { 28 | IConstraint m = (IConstraint) constraints.get(i); 29 | if (m != setter) 30 | { 31 | m.valueChanged(); 32 | } 33 | } 34 | } 35 | 36 | public void reset(IConstraint theConstraint) 37 | { 38 | if (theConstraint == setter) 39 | { 40 | value = 0.0; 41 | hasValue = false; 42 | setter = null; 43 | 44 | // notify the mediators 45 | for (int i = 0; i < constraints.size(); i++) 46 | { 47 | IConstraint m = (IConstraint) constraints.get(i); 48 | if (m != setter) 49 | { 50 | m.reset(); 51 | } 52 | } 53 | } 54 | } 55 | 56 | public void connect(IConstraint theConstraint) 57 | { 58 | if (constraints == null) 59 | { 60 | constraints = new ArrayList(); 61 | } 62 | constraints.add(theConstraint); 63 | } 64 | } -------------------------------------------------------------------------------- /DataDrivenTests/DataDrivenTests.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28124.53 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataDrivenTests", "DataDrivenTests\DataDrivenTests.csproj", "{DEFD8C18-7C99-4B5F-BAA7-CE6702AB4175}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {DEFD8C18-7C99-4B5F-BAA7-CE6702AB4175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {DEFD8C18-7C99-4B5F-BAA7-CE6702AB4175}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {DEFD8C18-7C99-4B5F-BAA7-CE6702AB4175}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {DEFD8C18-7C99-4B5F-BAA7-CE6702AB4175}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /DataDrivenTests/DataDrivenTests/InlineDataDrivenTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace DataDrivenTests 5 | { 6 | [TestClass] 7 | public class InlineDataDrivenTest 8 | { 9 | // The DataRow attribute can be used to provide values inline. These values have to be constants. 10 | [DataTestMethod] 11 | [DataRow(1, 2, 3)] 12 | [DataRow(1, 2+2, 3+2)] 13 | public void TestMethod1(int x, int y, int sum) 14 | { 15 | var res = x + y; 16 | Assert.AreEqual(sum, res); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DataDrivenTests/DataDrivenTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("DataDrivenTests")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("DataDrivenTests")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("defd8c18-7c99-4b5f-baa7-ce6702ab4175")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /DataDrivenTests/DataDrivenTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DataDrivenTests/README.md: -------------------------------------------------------------------------------- 1 | ### Build Status 2 | [![Build status](https://pvlakshm.visualstudio.com/Samples/_apis/build/status/DataDrivenTests-CI)](https://pvlakshm.visualstudio.com/Samples/_build/latest?definitionId=92) 3 | ### Data Driven Test (MSTest V2 based) 4 | This sample illsutrates various ways of data driving a test. 5 | 1. [inline data driven](./DataDrivenTests/InlineDataDrivenTest.cs) 6 | 2. [dynamic data driven](./DataDrivenTests/DynamicDataDrivenTest.cs) 7 | 3. [custom data source driven](./DataDrivenTests/CustomDataDrivenTest.cs) 8 | -------------------------------------------------------------------------------- /FlakyTests/AppCode/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AppCode 8 | { 9 | public class Class1 10 | { 11 | public int addFlaky(int x, int y) 12 | { 13 | // Here, this business logic itself is flaky. 14 | // 15 | // compute the actual sum. 16 | // then genereate a random number below 1000. If that number is odd, then add 1 to the sum. 17 | // return the sum 18 | int sum = x + y; 19 | 20 | int r = new System.Random().Next(1000); 21 | r = r % 2; 22 | sum += r; 23 | 24 | return sum; 25 | } 26 | 27 | public int addStable(int x, int y) 28 | { 29 | int sum = x + y; 30 | return sum; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /FlakyTests/AppCode/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AppCode")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AppCode")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("123080fd-b222-4c72-a4aa-72b022bfe503")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /FlakyTests/AppTestProject1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("AppTestProject1")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("AppTestProject1")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("e8f033f5-7ab4-4f3f-bc65-ca9726c919f8")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /FlakyTests/AppTestProject1/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InAssemblyParallel/ClassLibrary1/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ClassLibrary1 8 | { 9 | public class Class1 10 | { 11 | public void Delay(double secs) 12 | { 13 | int millisecs = (int)(1000 * secs); 14 | System.Threading.Thread.Sleep(millisecs); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /InAssemblyParallel/ClassLibrary1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ClassLibrary1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ClassLibrary1")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("0be4bedc-1188-4587-a12e-19da16963789")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("UTA1")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("UTA1")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("2dfd06d2-3a87-4f5a-8b11-6ef9641a8cfd")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA1/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("UTA2")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("UTA2")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("915223d7-b2b2-4ff8-8c42-7453ae123c9e")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA2/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA3/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("UTA3")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("UTA3")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("b7f3e437-c0ca-4ca9-a509-475e26064045")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA3/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA4/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("UTA4")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("UTA4")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("0599a1eb-c862-49ac-8470-0387a469bf53")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /InAssemblyParallel/UTA4/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /InAssemblyParallel/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/InAssemblyParallel/image.jpg -------------------------------------------------------------------------------- /InAssemblyParallel/test.runsettings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 1 13 | MethodLevel 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /IntelliTest/PathCoverage/PathCoverage.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26621.2 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PathCoverage", "PathCoverage\PathCoverage.csproj", "{AE6791F6-EECC-438E-8B28-FBED19CC0E81}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {AE6791F6-EECC-438E-8B28-FBED19CC0E81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {AE6791F6-EECC-438E-8B28-FBED19CC0E81}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {AE6791F6-EECC-438E-8B28-FBED19CC0E81}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {AE6791F6-EECC-438E-8B28-FBED19CC0E81}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3289FFE9-A35D-4E08-8024-ACA4F0A9762E} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /IntelliTest/PathCoverage/PathCoverage/PathCoverage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PathCoverage 4 | { 5 | public class PathCoverage 6 | { 7 | public void ManyPaths(int a, int b) 8 | { 9 | if (a > 10) 10 | { 11 | Console.WriteLine("A"); 12 | } 13 | else 14 | { 15 | Console.WriteLine("a"); 16 | } 17 | 18 | if (b > 10) 19 | { 20 | Console.WriteLine("B"); 21 | } 22 | else 23 | { 24 | Console.WriteLine("b"); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /IntelliTest/PathCoverage/PathCoverage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PathCoverage")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PathCoverage")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ae6791f6-eecc-438e-8b28-fbed19cc0e81")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /IntelliTest/PathCoverage/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/IntelliTest/PathCoverage/readme.md -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Data/AccountRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using SimpleBank.Domain; 6 | using SimpleBank.Repository; 7 | 8 | namespace SimpleBank.Data 9 | { 10 | public class AccountRepository : IAccountRepository 11 | { 12 | public void CreateAccount( 13 | Account a) 14 | { 15 | return; 16 | } 17 | 18 | public Account GetAccount( 19 | int id) 20 | { 21 | return new Account(); 22 | } 23 | 24 | public void UpdateAccount( 25 | Account a) 26 | { 27 | return; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Data/OperationRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using SimpleBank.Domain; 6 | using SimpleBank.Repository; 7 | 8 | namespace SimpleBank.Data 9 | { 10 | public class OperationRepository : IOperationRepository 11 | { 12 | public void CreateOperation( 13 | Operation o) 14 | { 15 | return; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Domain/Account.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace SimpleBank.Domain 7 | { 8 | public class Account 9 | { 10 | public int Id { get; set; } // an a/c number 11 | public decimal Balance { get; set; } // a/c balance 12 | public bool AuthorizeOverdraft { get; set; } // is this a/c authorized for an overdraft 13 | public IList Operations { get; set; } // history of the operations performed on this account 14 | 15 | public Account() 16 | { 17 | Operations = new List(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Domain/Direction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace SimpleBank.Domain 7 | { 8 | public enum Direction 9 | { 10 | // direction of money transfer 11 | Deposit = 1, 12 | Withdraw = -1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Domain/Operation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace SimpleBank.Domain 7 | { 8 | public class Operation 9 | { 10 | // an operation tranfers an amount in a particular direction 11 | public int AccountID { get; set; } 12 | public decimal Amount { get; set; } 13 | public Direction Direction { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using SimpleBank.Domain; 7 | using SimpleBank.Repository; 8 | using SimpleBank.Data; 9 | 10 | namespace SimpleBank 11 | { 12 | class Program 13 | { 14 | static void Main( 15 | string[] args) 16 | { 17 | Account a1 = new Account { Id = 34, AuthorizeOverdraft = false, Balance = 34000 }; 18 | Account a2 = new Account { Id = 35, AuthorizeOverdraft = false, Balance = 4000 }; 19 | 20 | var a = new AccountService(new AccountRepository(), new OperationRepository()); 21 | a.MakeTransfer(a2, a1, 1000); 22 | // dummy just to get this Console App project to build 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleBank")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleBank")] 13 | [assembly: AssemblyCopyright("Copyright © 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("dcb52db5-46e6-427e-b7ba-3880ee4efe43")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | 38 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Repository/IAccountRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using SimpleBank.Domain; 6 | 7 | namespace SimpleBank.Repository 8 | { 9 | public interface IAccountRepository 10 | { 11 | // Using the Repository pattern to access the data source (whatever that source may be). 12 | // Separate querying of the data from the business logic. 13 | void CreateAccount(Account account); 14 | Account GetAccount(int id); 15 | void UpdateAccount(Account account); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Repository/IOperationRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using SimpleBank.Domain; 6 | 7 | namespace SimpleBank.Repository 8 | { 9 | public interface IOperationRepository 10 | { 11 | // Using the repository pattern to access the data source (whatever that source may be). 12 | // Separate querying of the data from the business logic. 13 | void CreateOperation(Operation o); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/SimpleBank/Services/AccountServiceException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace SimpleBank 7 | { 8 | class AccountServiceException : Exception 9 | { 10 | public AccountServiceException( 11 | string message) 12 | : base(message) 13 | { 14 | // do nothing 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /IntelliTest/SimpleBank/readme.md: -------------------------------------------------------------------------------- 1 | A .NET Fraemwork app modelling some banking services. 2 | 3 | - the folder Domain represents some entities from the domain - like, and account, an employee, an operation (deposit/withdraw), and an opration 4 | - the folder Repository uses the Repository pattern to access a data source 5 | - the folder Data will use a data source as appropriate (currently just stubs) 6 | - and the folder Services implements some services like make a transfer, determine pension contribution for an employee, etc. 7 | 8 | The method ```EmployeeServices.DeterminePensionContribution``` has some business logic. Do a "Run IntelliTest". Note that IntelliTest is able to generate a compact suite of tests with high coverage. 9 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/DAL/DAL.cs: -------------------------------------------------------------------------------- 1 | namespace DAL 2 | { 3 | using System.IO; 4 | using Models; 5 | 6 | public class DAL : IDAL 7 | { 8 | public uint HRA( 9 | Employee e) 10 | { 11 | // return the same value for all employess as per busines rule. Or, return 0. 12 | if (File.Exists("config.data")) 13 | { 14 | var sr = new StreamReader("c:\\config.data"); 15 | int i = sr.Read(); 16 | return (uint)i; 17 | } 18 | 19 | return 0; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/DAL/IDAL.cs: -------------------------------------------------------------------------------- 1 | namespace DAL 2 | { 3 | using Models; 4 | 5 | public interface IDAL 6 | { 7 | uint HRA( 8 | Employee e); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/DAL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DAL")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DAL")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b69bca43-0859-47ed-a904-6e4bf5b62c2f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/Models/House.cs: -------------------------------------------------------------------------------- 1 | namespace Models 2 | { 3 | using System; 4 | 5 | public class House 6 | { 7 | private uint monthlyRent; 8 | 9 | public bool IsRented { 10 | get; 11 | set; 12 | } 13 | 14 | public Location Location { 15 | get; 16 | set; 17 | } 18 | 19 | public uint MonthlyRent 20 | { 21 | get 22 | { 23 | return this.monthlyRent; 24 | } 25 | 26 | set 27 | { 28 | if (value == 0) 29 | { 30 | throw new InvalidRentException(); 31 | } 32 | 33 | this.monthlyRent = value; 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /IntelliTest/Taxation/Models/InvalidLocationException.cs: -------------------------------------------------------------------------------- 1 | namespace Models 2 | { 3 | using System; 4 | 5 | public class InvalidLocationException : Exception 6 | { 7 | public InvalidLocationException() { } 8 | public InvalidLocationException( 9 | string message) : base(message) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/Models/InvalidRentException.cs: -------------------------------------------------------------------------------- 1 | namespace Models 2 | { 3 | using System; 4 | 5 | public class InvalidRentException : Exception 6 | { 7 | public InvalidRentException() { } 8 | public InvalidRentException( 9 | string message) : base(message) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/Models/Location.cs: -------------------------------------------------------------------------------- 1 | namespace Models 2 | { 3 | public enum Location 4 | { 5 | Metro, 6 | NonMetro 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/Models/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Models")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Models")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("649c6272-1b5a-4f7e-b551-48f60377ae0c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/README.md: -------------------------------------------------------------------------------- 1 | IntelliTest sample "Taxation" showing the following: 2 | - checking whether the code under test has testability issues 3 | - generating a compact suite with high coverage 4 | 5 | This is a .NET Framework app modelling some taxation functionality. 6 | - the folder ```Models``` represents some entities from the domain - like, an employee, the house (s)he is living in, the location of the house, and a couple of exceptions that can be raised. 7 | - the folder ```DAL``` is the data access layer Repository and uses the environment to look up, and return, data about an employee. In this case it uses the file system. Such dependency on the external environment renders the code non-unit testable (it needs to be mocked, or dependency-injected, etc.) 8 | - and the folder ```TaxCalculators``` implements some tax calculations. The calculations are concrete implementations of the ITaxCalculator interface. 9 | 10 | Do a "Run IntelliTest" inside ```TaxCalculator.CalculateExemptionForRent```. Note that IntelliTest is able to discover, and use, a concrete implementation for ITaxCalculator, is able to instantiate an Employee type using publicly accessible methods, and is able to set up the instance data on the type with real values. This lets IntelliTest generate a compact test suite with high code coverage. 11 | 12 | Do a "Run IntelliTest" inside ```TaxRecord.EmployeeHRADeductionEligible```. Note that IntelliTest is able to discover, and use, a concrete instance of IDAL, and is able to instantiate a ```TaxRecord``` type (for 'd') using publicly accessible methods. The HRA method on the IDAL implementation access the ```FileSystem```. Note how IntelliTest flags that as a Testability issue. 13 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/TaxCalculators/Calculators/ITaxCalculator.cs: -------------------------------------------------------------------------------- 1 | namespace TaxCalculators 2 | { 3 | using Models; 4 | 5 | public interface ITaxCalculator 6 | { 7 | uint calculate( 8 | bool IsRented, 9 | Location location, 10 | uint AnnualBasicSalary, 11 | uint MonthlyRent, 12 | uint AnnualHouseRentAllowance); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/TaxCalculators/TaxCalculator.cs: -------------------------------------------------------------------------------- 1 | namespace TaxCalculators 2 | { 3 | using System; 4 | using Models; 5 | 6 | public class TaxCalculator 7 | { 8 | public uint CalculateExemptionForRent( 9 | Employee employee, 10 | ITaxCalculator ic) 11 | { 12 | // Run IntelliTest here. 13 | // Note that IntelliTest is able to discover, and use, a concrete 14 | // implementation for ITaxCalculator, is able to instantiate an 15 | // Employee type using publicly accessible methods, and is able to 16 | // set up the instance data on the type with real values that can 17 | // let IntelliTest generate a compact test suite with high code coverage. 18 | var taxExemption = ic.calculate( 19 | employee.Property.IsRented, 20 | employee.Property.Location, 21 | employee.AnnualBasicSalary, 22 | employee.Property.MonthlyRent, 23 | employee.AnnualHouseRentAllowance); 24 | 25 | return taxExemption; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /IntelliTest/Taxation/TaxCalculators/TaxRecord.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace TaxCalculators 8 | { 9 | using DAL; 10 | using Models; 11 | 12 | public class TaxRecord 13 | { 14 | private IDAL d; 15 | public TaxRecord( 16 | IDAL id) 17 | { 18 | d = id; 19 | } 20 | 21 | public bool EmployeeHRADeductionEligible( 22 | Employee employee) 23 | { 24 | // Run IntelliTest here. 25 | // Note that IntelliTest is able to discover, and use, a concrete 26 | // instance of IDAL, and is able to instantiate a TaxRecord type 27 | // (for 'd') using publicly accessible methods. 28 | // The HRA method on the IDAL implementation access the FileSystem. 29 | // Note how IntelliTest flags that as a Testability issue. 30 | uint val = d.HRA(employee); 31 | 32 | if (val > 0) 33 | return true; 34 | else 35 | return false; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /IntelliTest/readme.md: -------------------------------------------------------------------------------- 1 | These folder contain samples related to IntelliTest. 2 | 3 | Over time, they will grow to have code illustrating various concepts/features of IntelliTest. 4 | 5 | If you would like to see any sample in particular, open an "Issue" for it, please. 6 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeEx/NoteAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace AttributeEx 5 | { 6 | // ------------------------------------------------------------------------------------------- 7 | // A strongly typped "Note" attribute that allows attaching a string as a note to a testmethod 8 | // E.g. 9 | // [TestMethod] 10 | // [Note("lorem ipsum")] 11 | // public void myTestCase() { } 12 | // ------------------------------------------------------------------------------------------- 13 | 14 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 15 | public class NoteAttribute : TestPropertyAttribute 16 | { 17 | public NoteAttribute(string s) 18 | : base("Note", s) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeEx/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AttributeEx")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AttributeEx")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1d4b3cf9-d496-4a6e-b5ab-bb98600e9720")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeEx/SmokeTestAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace AttributeEx 5 | { 6 | // ------------------------------------------------------------------------------------------- 7 | // A strongly typed attribute that allows categorizing a testmethod as a so called SmokeTest. 8 | // E.g. 9 | // [TestMethod] 10 | // [SmokeTest] 11 | // public void myTestCase() { } 12 | // ------------------------------------------------------------------------------------------- 13 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 14 | public class SmokeTestAttribute : TestPropertyAttribute 15 | { 16 | public SmokeTestAttribute() 17 | : base("SmokeTest", null) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeEx/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeExTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("AttributeExTests")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("AttributeExTests")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("e6fde706-6aa5-428f-838c-63a02e37b921")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeExTests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using AttributeEx; 4 | 5 | namespace AttributeExTests 6 | { 7 | // these are test methods annotated with the attribute extensions. The intent is to visually validate 8 | // how they show up in the various Visual Studio Test Explorer interactions. 9 | [TestClass] 10 | public class UnitTest1 11 | { 12 | [TestMethod] 13 | [SmokeTest] 14 | [Note("No external dependencies!")] 15 | public void TestMethod1() { } 16 | 17 | [TestMethod] 18 | [Note("CPU intensive")] 19 | public void TestMethod2() { } 20 | 21 | [TestMethod] 22 | [Note("CPU intensive")] 23 | [Note("Memory intensive")] 24 | public void TestMethod3() { } 25 | 26 | // double byte:  { "啊齄", "\u554a\u9f44" }, 27 | [TestMethod] 28 | [Note("啊齄")] 29 | public void TestMethod4() { } 30 | 31 | [TestMethod] 32 | [Note("\u554a\u9f44")] 33 | public void TestMethod4a() { } 34 | 35 | // Four byte: Ext-A { "㐀㒣", "\u3400\u34a3" }, 36 | [TestMethod] 37 | [Note("㐀㒣")] 38 | public void TestMethod5() { } 39 | 40 | [TestMethod] 41 | [Note("\u3400\u34a3")] 42 | public void TestMethod5a() { } 43 | 44 | // Four byte: Ext-B { "𠀀𠀁","\ud840\udc00\ud840\udc01"}, 45 | [TestMethod] 46 | [Note("𠀀𠀁")] 47 | public void TestMethod6() { } 48 | 49 | [TestMethod] 50 | [Note("\ud840\udc00\ud840\udc01")] 51 | public void TestMethod6a() { } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeExTests/obj/Release/AttributeExTests.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 1b7ca7dfe5ba4a8445be07b2f2d43f411b4ed7ae 2 | -------------------------------------------------------------------------------- /MSTestV2Ex/AttributeEx/AttributeExTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Math/Math.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27413.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mathlib", "Mathlib\Mathlib.csproj", "{D4B37BC0-5139-4619-B1A1-52C017415246}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MathlibTests", "MathlibTests\MathlibTests.csproj", "{2E3DF5C2-8A38-4A03-86D7-8D463C917E47}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {D4B37BC0-5139-4619-B1A1-52C017415246}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {D4B37BC0-5139-4619-B1A1-52C017415246}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {D4B37BC0-5139-4619-B1A1-52C017415246}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {D4B37BC0-5139-4619-B1A1-52C017415246}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {30244411-64F5-44CB-A3E8-D16A220F279F} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Math/Mathlib/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Mathlib 8 | { 9 | public class Class1 10 | { 11 | public int add(int x, int y) 12 | { 13 | return x + y; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Math/Mathlib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Mathlib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Mathlib")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d4b37bc0-5139-4619-b1a1-52c017415246")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Math/MathlibTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MathlibTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MathlibTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9abbd6a9-5f95-442a-88db-3fc1ebf374a7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Math/MathlibTests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Xunit; 4 | using Mathlib; 5 | 6 | 7 | namespace MathlibTests 8 | { 9 | public class UnitTest1 10 | { 11 | [Fact] 12 | public void TestMethod1() 13 | { 14 | int x = 5; 15 | int y = 6; 16 | int sum = 11; 17 | 18 | int res = new Mathlib.Class1().add(x, y); 19 | Assert.Equal(sum, res); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1/Bar.cs: -------------------------------------------------------------------------------- 1 | public class Bar { public static bool Debug = false; } -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1/Foo.cs: -------------------------------------------------------------------------------- 1 |  2 | public class Foo 3 | { 4 | public void MyFunc() 5 | { 6 | if (Bar.Debug) 7 | Gotcha.Run(); 8 | } 9 | } -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1/Gotcha.cs: -------------------------------------------------------------------------------- 1 | public class Gotcha 2 | { 3 | public static void Run() {} 4 | } -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample1")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("705be185-aef9-49e4-8445-b835222b7d7c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1Tests/FooTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Tests 9 | { 10 | [TestClass()] 11 | public class FooTests 12 | { 13 | [TestMethod()] 14 | public void MyFuncTest() 15 | { 16 | new Foo().MyFunc(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample1Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample1Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7dc2caef-4f16-432d-b175-5b111d2fd4de")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MemberAccess/Sample1/Sample1Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MemberAccess/Sample1/readme.md: -------------------------------------------------------------------------------- 1 | ### Build status 2 | | |Debug/Release | 3 | |:----------:|:----------------:| 4 | |**master** || 5 | -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2/Bar.cs: -------------------------------------------------------------------------------- 1 | public class Bar { public static bool Debug() { return true;} } -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2/Foo.cs: -------------------------------------------------------------------------------- 1 |  2 | public class Foo 3 | { 4 | public void MyFunc() 5 | { 6 | if (Bar.Debug()) 7 | Gotcha.Run(); 8 | } 9 | } -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2/Gotcha.cs: -------------------------------------------------------------------------------- 1 | public class Gotcha 2 | { 3 | public static void Run() {} 4 | } -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample2")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample2")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a404ab13-624c-49f4-bd6d-b8b1aa7b4e27")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2Tests/FooTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Tests 9 | { 10 | [TestClass()] 11 | public class FooTests 12 | { 13 | [TestMethod()] 14 | public void MyFuncTest() 15 | { 16 | new Foo().MyFunc(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample2Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample2Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("cea8d9a4-edb7-4f6a-b637-4cf4b36840e6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MemberAccess/Sample2/Sample2Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MemberAccess/Sample2/readme.md: -------------------------------------------------------------------------------- 1 | ### Build status 2 | | |Debug/Release | 3 | |:----------:|:----------------:| 4 | |**master** || 5 | -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3/Bar.cs: -------------------------------------------------------------------------------- 1 | public class Bar { public static bool Debug { get; } = true; } -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3/Foo.cs: -------------------------------------------------------------------------------- 1 |  2 | public class Foo 3 | { 4 | public void MyFunc() 5 | { 6 | if (Bar.Debug) 7 | Gotcha.Run(); 8 | } 9 | } -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3/Gotcha.cs: -------------------------------------------------------------------------------- 1 | public class Gotcha 2 | { 3 | public static void Run() {} 4 | } -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample3")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample3")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d9c0d18c-49e3-400f-800f-315fce3c7bc6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3Tests/FooTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Tests 9 | { 10 | [TestClass()] 11 | public class FooTests 12 | { 13 | [TestMethod()] 14 | public void MyFuncTest() 15 | { 16 | new Foo().MyFunc(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample3Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample3Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7bba51e7-94c9-4792-bdcf-21ce29ff6292")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MemberAccess/Sample3/Sample3Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MemberAccess/Sample3/readme.md: -------------------------------------------------------------------------------- 1 | ### Build status 2 | | |Debug/Release | 3 | |:----------:|:----------------:| 4 | |**master** || 5 | -------------------------------------------------------------------------------- /NUnit.Tests5/NUnit.Tests5.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27309.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NUnit.Tests5", "NUnit.Tests5\NUnit.Tests5.csproj", "{8EDF4429-251A-416D-BB68-93F227191BCF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {9486A036-8417-411A-BEFA-3698D22F236A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /NUnit.Tests5/NUnit.Tests5/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NUnit.Tests5")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("nunit.tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /NUnit.Tests5/NUnit.Tests5/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /NUnit39/1.runsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | file 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1 20 | true 21 | true 22 | true 23 | 24 | -------------------------------------------------------------------------------- /NUnit39/ClassLibrary1/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ClassLibrary1 8 | { 9 | public class Class1 10 | { 11 | public bool isEven(int i) 12 | { 13 | if (i % 2 == 0) 14 | { 15 | return true; 16 | } 17 | else 18 | { 19 | return false; 20 | } 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /NUnit39/ClassLibrary1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ClassLibrary1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ClassLibrary1")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e7608256-04e1-426c-bff4-d541a649afd9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /NUnit39/ClassLibrary1/op.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ClassLibrary1 8 | { 9 | public class op 10 | { 11 | public double doubleIt(double d) 12 | { 13 | return d * 2; 14 | } 15 | 16 | public double noop(double d) 17 | { 18 | return d; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /NUnit39/NUnit39/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NUnit39")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("nunit.tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /NUnit39/NUnit39/TestClass2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NUnit.Framework; 7 | 8 | 9 | [assembly: LevelOfParallelism(1)] 10 | 11 | namespace NUnit39 12 | { 13 | public class TestClass2 14 | { 15 | [TestCase] 16 | public void doubleTest() 17 | { 18 | Console.WriteLine("doubleTest actually started " + DateTime.UtcNow.Ticks.ToString()); 19 | double res = new ClassLibrary1.op().doubleIt(5); 20 | //Assert.AreEqual(10.0, res, double.Epsilon); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /NUnit39/NUnit39/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/OutOfProcDataCollector.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netcoreapp2.0;net451 4 | 15.0.0.0 5 | 1.6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\Extensions\TestPlatform\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/net451/OutOfProcDataCollector.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("OutOfProcDataCollector")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("15.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("15.0.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("OutOfProcDataCollector")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("OutOfProcDataCollector")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("15.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/net451/OutOfProcDataCollector.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/net451/OutOfProcDataCollector.csproj.CopyComplete -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/net451/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/net451/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/net451/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/net451/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/net451/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/net451/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/netcoreapp2.0/OutOfProcDataCollector.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("OutOfProcDataCollector")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("15.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("15.0.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("OutOfProcDataCollector")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("OutOfProcDataCollector")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("15.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/Debug/netcoreapp2.0/OutOfProcDataCollector.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/NUnit39/OutOfProcDataCollector/obj/Debug/netcoreapp2.0/OutOfProcDataCollector.csproj.CopyComplete -------------------------------------------------------------------------------- /NUnit39/OutOfProcDataCollector/obj/OutOfProcDataCollector.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2x/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace NUnit2x 8 | { 9 | public class Class1 10 | { 11 | public bool isEven(int i) 12 | { 13 | if (i % 2 == 0) 14 | return true; 15 | else 16 | return false; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2x/Class2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace NUnit2x 8 | { 9 | public class Class2 10 | { 11 | public int sum(int i, int j) 12 | { 13 | if (i == 0) 14 | return j; 15 | else if (j == 0) 16 | return i; 17 | else 18 | return i + j; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2x/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NUnit2x")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NUnit2x")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ed916f3e-aab2-4593-8ac6-cae9030906a7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2xTests/Class1Tests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NUnit.Framework; 7 | using NUnit2x; 8 | 9 | namespace NUnit2xTests 10 | { 11 | public class Class1Tests 12 | { 13 | [TestCase] 14 | public void TestMethod1() 15 | { 16 | bool res = new Class1().isEven(4); 17 | Assert.IsTrue(res); 18 | } 19 | 20 | 21 | [TestCase] 22 | [Category("BVT")] 23 | public void TestMethod2() 24 | { 25 | bool res = new Class1().isEven(5); 26 | Assert.IsFalse(res); 27 | } 28 | 29 | 30 | [TestCase(100, true)] 31 | [TestCase(101, false)] 32 | public void TestMethod3(int val, bool res) 33 | { 34 | bool b = new Class1().isEven(val); 35 | Assert.AreEqual(res, b); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2xTests/Class2Tests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NUnit.Framework; 7 | using NUnit2x; 8 | 9 | namespace NUnit2xTests 10 | { 11 | class Class2Tests 12 | { 13 | [TestCase] 14 | public void TestSum1() 15 | { 16 | int res = new Class2().sum(5, 6); 17 | Assert.AreEqual(11, res); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2xTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NUnit2xTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NUnit2xTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("04f11913-5751-4b20-9f74-ba2228ebebb8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /NUnitTests/NUnit2x/NUnit2xTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /NUnitTests/NUnit3x/NUnit3x/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace NUnit3x 8 | { 9 | public class Class1 10 | { 11 | public bool isEven(int i) 12 | { 13 | System.Threading.Thread.Sleep(1000 * 2); 14 | if (i % 2 == 0) 15 | return true; 16 | else 17 | return false; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /NUnitTests/NUnit3x/NUnit3x/Class2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace NUnit3x 8 | { 9 | public class Class2 10 | { 11 | public double Root(double i) 12 | { 13 | System.Threading.Thread.Sleep(1000 * 2); 14 | double d = Math.Sqrt(i); 15 | // comment 16 | return d; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NUnitTests/NUnit3x/NUnit3x/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NUnit3x")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NUnit3x")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2b565e6b-9f89-4270-8d97-daeb181c115b")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /NUnitTests/NUnit3x/NUnit3xTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NUnit3xTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NUnit3xTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e9710d9e-598b-4098-abfb-b2ff69f7a475")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /NUnitTests/NUnit3x/NUnit3xTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /NUnitTests/NUnit3x/readme.md: -------------------------------------------------------------------------------- 1 | ### Build status 2 | | |Debug/Release | 3 | |:----------:|:----------------:| 4 | |**master** || 5 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/MSTestV2TestProject/AddTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | 3 | namespace MSTestV2TestProejct 4 | { 5 | [TestClass] 6 | public class AddTests 7 | { 8 | [TestMethod] 9 | public void Add5and6for11() 10 | { 11 | int x = 5; 12 | int y = 6; 13 | int res = 11; 14 | 15 | var val = new MathLib.Add().add(x, y); 16 | Assert.AreEqual(res, val); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/MSTestV2TestProject/MSTestV2TestProject.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/NUnit3TestProject/NUnit3TestProject.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/NUnit3TestProject/SubTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | 4 | namespace NUnit3TestProject 5 | { 6 | public class SubTests 7 | { 8 | [TestCase] 9 | public void Sub2from4for2() 10 | { 11 | int x = 4; 12 | int y = 2; 13 | int res = 2; 14 | 15 | var val = new MathLib.Subtract().sub(x, y); 16 | Assert.AreEqual(res, val); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/NetCoreSampleForCC/Add.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MathLib 4 | { 5 | public class Add 6 | { 7 | public int add(int x, int y) 8 | { 9 | return x + y; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/NetCoreSampleForCC/MathLib.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/NetCoreSampleForCC/Multiply.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MathLib 6 | { 7 | public class Multiply 8 | { 9 | public int mult(int x, int y) 10 | { 11 | return x * y; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/NetCoreSampleForCC/Subtract.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MathLib 6 | { 7 | public class Subtract 8 | { 9 | public int sub(int x, int y) 10 | { 11 | return x - y; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/readme.md: -------------------------------------------------------------------------------- 1 | # .NET Core Sample for code coverage 2 | Introducing code coverage for tests targeting .Net Core (Windows). Refer the following: 3 | - [vstest RFC 0021 - Code Coverage for .NET Core](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0021-CodeCoverageForNetCore.md) 4 | - [vstest Issue #981: Add support for dotnet test --collect:"Code Coverage"](https://github.com/Microsoft/vstest/issues/981) 5 | This capability is available in the Test Plaform starting from Microsoft.NET.Test.Sdk (15.8.0) onwards. 6 | 7 | ## This sample solution 8 | This solution is a sample ilustrating code coverage collection for code targeting .NET Core. 9 | - [NetCoreSamplesForCC](./NetCoreSamplesForCC): system under test targeting netcoreapp2.1 10 | - [MSTestV2TestProject](./MSTestV2TestProject): test project using MSTest V2 (v1.3.2), and targeting netcoreapp2.1 11 | - [NUnit3TestProject](./NUnit3TestProject): test project using NUnit (v3.10.0), and targeting netcoreapp2.1 12 | - [xUnitTestProject](./xUnitTestProject): test project using xUnit (v2.4.0), and targeting netcoreapp2.1 13 | 14 | ### Code Coverage from within Visual Studio 15 | 1. Build the solution 16 | 2. Select all the tests in the Test Explorer, and invoke the "Analyze Code Coverage for Selected Tests" menu command 17 | 18 | ### Code Coverage from CLI 19 | Go to each of the Test folders folder within `Tests` and run the following command to generate code coverage data: 20 | 1. `dotnet test –collect "Code coverage"` [you can also use `"code coverage"` (with the lower case 'c').] 21 | 2. Open the generated `.coverage` file in VS Enterprise to see the coverage info. 22 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/xUnitTestProject/MultTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | 4 | namespace xUnitTestProject 5 | { 6 | public class MultTests 7 | { 8 | [Fact] 9 | public void Mult5and5for25() 10 | { 11 | int x = 5; 12 | int y = 5; 13 | int res = 25; 14 | 15 | var val = new MathLib.Multiply().mult(x, y); 16 | Assert.Equal(res, val); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NetCoreSampleForCC/xUnitTestProject/xUnitTestProject.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | all 14 | runtime; build; native; contentfiles; analyzers 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Samples 2 | Sample code for various features. Each top level folder is a distinct sample. 3 | -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/2DShapes/Circle.h: -------------------------------------------------------------------------------- 1 | #ifndef CIRCLE_H 2 | #define CIRCLE_H 3 | 4 | #include "Shape.h" 5 | 6 | class Circle : public Shape { 7 | private: 8 | double radius; 9 | 10 | public: 11 | Circle(double radius = 1.0, const string & color = "green"); 12 | 13 | double getRadius() const; 14 | void setRadius(double radius); 15 | 16 | double getArea() const; 17 | double getVolume() const; 18 | }; 19 | 20 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/2DShapes/Rectangle.h: -------------------------------------------------------------------------------- 1 | #ifndef RECTANGLE_H 2 | #define RECTANGLE_H 3 | 4 | #include "Shape.h" 5 | 6 | class Rectangle : public Shape { 7 | private: 8 | int length; 9 | int width; 10 | 11 | public: 12 | Rectangle(int length = 1, int width = 1, const string & color = "green"); 13 | 14 | int getLength() const; 15 | void setLength(int length); 16 | 17 | int getWidth() const; 18 | void setWidth(int width); 19 | 20 | double getArea() const; 21 | }; 22 | 23 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/2DShapes/Square.h: -------------------------------------------------------------------------------- 1 | #ifndef SQUARE_H 2 | #define SQUARE_H 3 | 4 | #include "Shape.h" 5 | 6 | class Square : public Shape { 7 | private: 8 | int side; 9 | 10 | public: 11 | Square(int side = 1, const string & color = "green"); 12 | 13 | int getSide() const; 14 | void setSide(int side); 15 | 16 | double getArea() const; 17 | }; 18 | 19 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/2DShapes/Triangle.h: -------------------------------------------------------------------------------- 1 | #ifndef TRIANGLE_H 2 | #define TRIANGLE_H 3 | 4 | #include "Shape.h" 5 | 6 | class Triangle : public Shape { 7 | private: 8 | int base; 9 | int height; 10 | 11 | public: 12 | Triangle(int base = 1, int height = 1, const string & color = "green"); 13 | 14 | int getBase() const; 15 | void setBase(int base); 16 | 17 | int getHeight() const; 18 | void setHeight(int height); 19 | 20 | double getArea() const; 21 | }; 22 | 23 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/3DShapes/Cube.h: -------------------------------------------------------------------------------- 1 | #ifndef CUBE_H 2 | #define CUBE_H 3 | 4 | #include "Shape.h" 5 | 6 | class Cube : public Shape 7 | { 8 | private: 9 | int side; 10 | 11 | public: 12 | Cube(int side = 1, const string & color = "green"); 13 | 14 | int getSide() const; 15 | void setSide(int side); 16 | 17 | double getVolume() const; 18 | }; 19 | 20 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/3DShapes/Cuboid.h: -------------------------------------------------------------------------------- 1 | #ifndef CUBOID_H 2 | #define CUBOID_H 3 | 4 | #include "Shape.h" 5 | 6 | class Cuboid : public Shape 7 | { 8 | private: 9 | int length; 10 | int width; 11 | int height; 12 | 13 | public: 14 | Cuboid(int length = 1, int width = 1, int height = 1, const string & color = "green"); 15 | 16 | int getLength() const; 17 | void setLength(int length); 18 | 19 | int getWidth() const; 20 | void setWidth(int width); 21 | 22 | int getHeight() const; 23 | void setHeight(int height); 24 | 25 | double getVolume() const; 26 | }; 27 | 28 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/3DShapes/Sphere.h: -------------------------------------------------------------------------------- 1 | #ifndef SPHERE_H 2 | #define SPHERE_H 3 | 4 | #include "Shape.h" 5 | 6 | class Sphere : public Shape { 7 | private: 8 | int radius; 9 | 10 | public: 11 | Sphere(int radius = 1, const string & color = "green"); 12 | 13 | int getRadius() const; 14 | void setRadius(int radius); 15 | 16 | double getVolume() const; 17 | }; 18 | 19 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/3DShapes/Tetrahedron.h: -------------------------------------------------------------------------------- 1 | #ifndef TETRAHEDRON_H 2 | #define TETRAHEDRON_H 3 | 4 | #include "Shape.h" 5 | 6 | class Tetrahedron : public Shape { 7 | private: 8 | int sideA; 9 | int sideB; 10 | int sideC; 11 | int height; 12 | 13 | public: 14 | Tetrahedron(int sideA = 1, int sideB = 1, int sideC = 1, int height = 1, const string & color = "green"); 15 | 16 | int getSideA() const; 17 | void setSideA(int sideA); 18 | 19 | int getSideB() const; 20 | void setSideB(int sideB); 21 | 22 | int getSideC() const; 23 | void setSideC(int sideC); 24 | 25 | int getHeight() const; 26 | void setHeight(int height); 27 | 28 | double getVolume() const; 29 | }; 30 | 31 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/Position.h: -------------------------------------------------------------------------------- 1 | #ifndef POSITION_H 2 | #define POSITION_H 3 | 4 | class Position { 5 | private: 6 | double m_x; 7 | double m_y; 8 | double m_z; 9 | 10 | public: 11 | Position(double x = 0.0, double y = 0.0, double z = 0.0); 12 | 13 | double getX() const; 14 | double getY() const; 15 | double getZ() const; 16 | 17 | Position* MoveX(double dx); 18 | Position* MoveY(double dy); 19 | Position* MoveZ(double dz); 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Shapes/Shapes/Headers/Shape.h: -------------------------------------------------------------------------------- 1 | #ifndef SHAPE_H 2 | #define SHAPE_H 3 | 4 | #include 5 | 6 | using namespace std; 7 | 8 | class Shape { 9 | private: 10 | string color; 11 | 12 | public: 13 | Shape(const string & color = "green"); 14 | 15 | string getColor() const; 16 | void setColor(const string & color); 17 | 18 | virtual double getArea() const = 0; 19 | 20 | virtual double getVolume() const = 0; 21 | }; 22 | 23 | #endif -------------------------------------------------------------------------------- /Shapes/Shapes/Src/2DShapes/Circle.cpp: -------------------------------------------------------------------------------- 1 | #include "Circle.h" 2 | 3 | #define PI 3.14159265 4 | // ctors 5 | Circle::Circle(double radius, const string & color) 6 | : Shape(color), radius(radius > 0.01 ? radius : 0.0) { } 7 | 8 | double Circle::getRadius() const 9 | { 10 | return radius; 11 | } 12 | 13 | void Circle::setRadius(double radius) 14 | { 15 | this->radius = radius; 16 | } 17 | 18 | double Circle::getArea() const 19 | { 20 | return PI * radius * radius; 21 | } 22 | 23 | double Circle::getVolume() const 24 | { 25 | return 0; 26 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/2DShapes/Rectangle.cpp: -------------------------------------------------------------------------------- 1 | #include "Rectangle.h" 2 | 3 | Rectangle::Rectangle(int length, int width, const string & color) 4 | : Shape(color), length(length), width(width) { } 5 | 6 | int Rectangle::getLength() const 7 | { 8 | return length; 9 | } 10 | 11 | void Rectangle::setLength(int length) 12 | { 13 | this->length = length; 14 | } 15 | 16 | int Rectangle::getWidth() const 17 | { 18 | return width; 19 | } 20 | 21 | void Rectangle::setWidth(int width) 22 | { 23 | this->width = width; 24 | } 25 | 26 | double Rectangle::getArea() const 27 | { 28 | return length * width; 29 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/2DShapes/Square.cpp: -------------------------------------------------------------------------------- 1 | #include "Square.h" 2 | 3 | // Constructor 4 | Square::Square(int side, const string & color) 5 | : Shape(color), side(side) { } 6 | 7 | int Square::getSide() const 8 | { 9 | return side; 10 | } 11 | 12 | void Square::setSide(int side) 13 | { 14 | this->side = side; 15 | } 16 | 17 | double Square::getArea() const 18 | { 19 | return side * side; 20 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/2DShapes/Triangle.cpp: -------------------------------------------------------------------------------- 1 | #include "Triangle.h" 2 | 3 | Triangle::Triangle(int base, int height, const string & color) 4 | : Shape(color), base(base), height(height) { } 5 | 6 | int Triangle::getBase() const 7 | { 8 | return base; 9 | } 10 | 11 | void Triangle::setBase(int base) 12 | { 13 | this->base = base; 14 | } 15 | 16 | int Triangle::getHeight() const 17 | { 18 | return height; 19 | } 20 | 21 | void Triangle::setHeight(int height) 22 | { 23 | this->height = height; 24 | } 25 | 26 | double Triangle::getArea() const 27 | { 28 | return 0.5 * base * height; 29 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/3DShapes/Cube.cpp: -------------------------------------------------------------------------------- 1 | #include "Cube.h" 2 | 3 | Cube::Cube(int side, const string & color) 4 | : Shape(color), side(side) { } 5 | 6 | int Cube::getSide() const 7 | { 8 | return side; 9 | } 10 | 11 | void Cube::setSide(int side) 12 | { 13 | this->side = side; 14 | } 15 | 16 | double Cube::getVolume() const 17 | { 18 | return side * side * side; 19 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/3DShapes/Cuboid.cpp: -------------------------------------------------------------------------------- 1 | #include "Cuboid.h" 2 | 3 | Cuboid::Cuboid(int length, int width, int height, const string & color) 4 | : Shape(color), length(length), width(width), height(height) { } 5 | 6 | int Cuboid::getLength() const 7 | { 8 | return length; 9 | } 10 | 11 | void Cuboid::setLength(int length) 12 | { 13 | this->length = length; 14 | } 15 | 16 | int Cuboid::getWidth() const 17 | { 18 | return width; 19 | } 20 | 21 | void Cuboid::setWidth(int width) 22 | { 23 | this->width = width; 24 | } 25 | 26 | int Cuboid::getHeight() const 27 | { 28 | return height; 29 | } 30 | 31 | void Cuboid::setHeight(int height) 32 | { 33 | this->height = height; 34 | } 35 | 36 | double Cuboid::getVolume() const 37 | { 38 | return length * width * height; 39 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/3DShapes/Sphere.cpp: -------------------------------------------------------------------------------- 1 | #include "Sphere.h" 2 | 3 | #define PI 3.14159265 4 | 5 | Sphere::Sphere(int radius, const string & color) 6 | : Shape(color), radius(radius) { } 7 | 8 | int Sphere::getRadius() const 9 | { 10 | return radius; 11 | } 12 | 13 | void Sphere::setRadius(int radius) 14 | { 15 | this->radius = radius; 16 | } 17 | 18 | double Sphere::getVolume() const 19 | { 20 | return 4/3 * (PI * radius * radius * radius); 21 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/3DShapes/Tetrahedron.cpp: -------------------------------------------------------------------------------- 1 | #include "Tetrahedron.h" 2 | 3 | Tetrahedron::Tetrahedron(int sideA, int sideB, int sideC, int height, const string & color) 4 | : Shape(color), sideA(sideA), sideB(sideB), sideC(sideC), height(height) { } 5 | 6 | int Tetrahedron::getSideA() const 7 | { 8 | return sideA; 9 | } 10 | 11 | void Tetrahedron::setSideA(int sideA) 12 | { 13 | this->sideA = sideA; 14 | } 15 | 16 | int Tetrahedron::getSideB() const 17 | { 18 | return sideB; 19 | } 20 | 21 | void Tetrahedron::setSideB(int sideB) 22 | { 23 | this->sideB = sideB; 24 | } 25 | 26 | int Tetrahedron::getSideC() const 27 | { 28 | return sideC; 29 | } 30 | 31 | void Tetrahedron::setSideC(int sideC) 32 | { 33 | this->sideC = sideC; 34 | } 35 | 36 | int Tetrahedron::getHeight() const 37 | { 38 | return height; 39 | } 40 | 41 | void Tetrahedron::setHeight(int height) 42 | { 43 | this->height = height; 44 | } 45 | 46 | 47 | double Tetrahedron::getVolume() const 48 | { 49 | double s = (sideA + sideB + sideC) / 2; // semiperimeter 50 | double areaOfBase = sqrt(s * (s - sideA) * (s - sideB) * (s - sideC)); 51 | double vol = 1 / 3 * areaOfBase * height; 52 | 53 | return vol; 54 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/Main.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | return 0; 4 | } -------------------------------------------------------------------------------- /Shapes/Shapes/Src/Position.cpp: -------------------------------------------------------------------------------- 1 | #include "Position.h" 2 | 3 | Position::Position(double x, double y, double z) 4 | { 5 | m_x = x; 6 | m_y = y; 7 | m_z = z; 8 | } 9 | 10 | double Position::getX() const 11 | { 12 | return m_x; 13 | } 14 | 15 | double Position::getY() const 16 | { 17 | return m_y; 18 | } 19 | 20 | double Position::getZ() const 21 | { 22 | return m_z; 23 | } 24 | 25 | Position* Position::MoveX(double dx) 26 | { 27 | m_x += dx; 28 | return this; 29 | } 30 | 31 | Position* Position::MoveY(double dy) 32 | { 33 | m_y += dy; 34 | return this; 35 | } 36 | 37 | Position* Position::MoveZ(double dz) 38 | { 39 | m_z += dz; 40 | return this; 41 | } 42 | -------------------------------------------------------------------------------- /Shapes/Shapes/Src/Shape.cpp: -------------------------------------------------------------------------------- 1 | #include "Shape.h" 2 | 3 | Shape::Shape(const string & color) 4 | { 5 | this->color = color; 6 | } 7 | 8 | string Shape::getColor() const 9 | { 10 | return color; 11 | } 12 | 13 | void Shape::setColor(const string & color) 14 | { 15 | this->color = color; 16 | } 17 | 18 | //double Shape::getArea() const 19 | //{ 20 | // return 0.0; 21 | //} -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/2DShapesTests/RectangleTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/2DShapesTests/RectangleTests.cpp -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/2DShapesTests/SquareTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/2DShapesTests/SquareTests.cpp -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/2DShapesTests/TriangleTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/2DShapesTests/TriangleTests.cpp -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/3DShapesTests/CubeTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/3DShapesTests/CubeTests.cpp -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/3DShapesTests/CuboidTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/3DShapesTests/CuboidTests.cpp -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/3DShapesTests/SphereTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/3DShapesTests/SphereTests.cpp -------------------------------------------------------------------------------- /Shapes/ShapesTests/Src/3DShapesTests/TetrahedronTests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Shapes/ShapesTests/Src/3DShapesTests/TetrahedronTests.cpp -------------------------------------------------------------------------------- /Shapes/TestImpact.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMath/Add.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SimpleMath 8 | { 9 | public class Add 10 | { 11 | // comment 12 | public int add(int x, int y) 13 | { 14 | //if (x == 0) 15 | // return y; 16 | 17 | //if (y == 0) 18 | // return x; 19 | 20 | return x + y; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMath/Div.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SimpleMath 8 | { 9 | public class Div 10 | { 11 | public int intdiv(int x, int y) 12 | { 13 | return x / y; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMath/Mult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SimpleMath 8 | { 9 | public class Mult 10 | { 11 | public int mult(int x, int y) 12 | { 13 | // if (y == 0) 14 | // return 0; 15 | return x * y; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMath/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleMath")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleMath")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a7f53183-420f-44ea-9d07-da3d205fa677")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /SimpleMath/SimpleMath/Sub.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SimpleMath 8 | { 9 | public class Sub 10 | { 11 | public int subtract(int x, int y) 12 | { 13 | return x - y; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathAddTests/AddTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using SimpleMath; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace SimpleMath.AddTests 10 | { 11 | [TestClass()] 12 | public class AddTests 13 | { 14 | [TestMethod()] 15 | public void addTest() 16 | { 17 | var i = new SimpleMath.Add().add(5, 4); 18 | Assert.AreEqual(9, i); 19 | 20 | //System.Threading.Thread.Sleep(((1 * 1000) * 62) * 10); // sleep for a little over 10 mins. 21 | } 22 | 23 | [TestMethod()] 24 | public void addTest2() 25 | { 26 | var i = new SimpleMath.Add().add(4, 5); 27 | Assert.AreEqual(9, i); 28 | } 29 | 30 | [TestMethod()] 31 | public void addTest3() 32 | { 33 | var i = new SimpleMath.Add().add(0, 0); 34 | Assert.AreEqual(0, i); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathAddTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleMathAddTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleMathAddTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2eeda2c4-b100-4f14-be94-aab6b2365ef2")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathAddTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathDivTests/DivTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using SimpleMath; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace SimpleMath.DivTests 10 | { 11 | [TestClass()] 12 | public class DivTests 13 | { 14 | // [TestMethod()] 15 | // public void intdivTest() 16 | // { 17 | // var i = new SimpleMath.Div().intdiv(40, 5); 18 | // Assert.AreEqual(8, i) 19 | //Commentfasdfasasdfsaasdf 20 | // } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathDivTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleMathDivTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleMathDivTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("380d26b9-51a3-4b53-8ea1-0b5ae3457540")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathDivTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathMultTests/MultTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using SimpleMath; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace SimpleMath.MultTests 10 | { 11 | [TestClass()] 12 | public class MultTests 13 | { 14 | [TestMethod()] 15 | public void multTest() 16 | { 17 | var i = new SimpleMath.Mult().mult(5, 4); 18 | Assert.AreEqual(20, i); 19 | //Comment 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathMultTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleMathMultTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleMathMultTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1990d57e-1402-43bb-b30a-cfc83c195874")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathMultTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathSubTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleMathSubTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleMathSubTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c9c1811d-e764-4134-9fdb-464811fcdaa0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SimpleMath/SimpleMathSubTests/SubTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using SimpleMath; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace SimpleMath.SubTests 10 | { 11 | [TestClass()] 12 | public class SubTests 13 | { 14 | [TestMethod()] 15 | public void subtractTest() 16 | { 17 | int i = new SimpleMath.Sub().subtract(5, 4); 18 | Assert.AreEqual(1, i); 19 | } 20 | 21 | [TestMethod()] 22 | public void subtractTest2() 23 | { 24 | int i = new SimpleMath.Sub().subtract(50, 40); 25 | Assert.AreEqual(10, i); 26 | } 27 | 28 | [TestMethod()] 29 | public void subtractTest3() 30 | { 31 | int i = new SimpleMath.Sub().subtract(500, 400); 32 | Assert.AreEqual(100, i); 33 | } 34 | 35 | [TestMethod()] 36 | public void subtractTest4() 37 | { 38 | int i = new SimpleMath.Sub().subtract(5000, 4000); 39 | Assert.AreEqual(1000, i); 40 | } 41 | 42 | [DataTestMethod()] 43 | [DataRow(3, 2, 1)] 44 | [DataRow(2, 3, -1)] 45 | [DataRow(2, 2, 0)] 46 | public void subtractTest5(int x, int y, int res) 47 | { 48 | int i = new SimpleMath.Sub().subtract(x, y); 49 | Assert.AreEqual(res, i); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /SimpleMath/SimpleMathSubTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SimpleMath/readme.md: -------------------------------------------------------------------------------- 1 | ### Build status 2 | | |Debug/Release | 3 | |:----------:|:----------------:| 4 | |**master** || 5 | 6 | ### Sample 7 | Using this as sample code to illustrate VSTS TIA. 8 | Read more about TIA here: 9 | 1. [Accelerated Continuous Testing with Test Impact Analysis – Part 1](https://blogs.msdn.microsoft.com/visualstudioalm/2017/03/02/accelerated-continuous-testing-with-test-impact-analysis-part-1/), 2 March 2017 10 | 2. [Accelerated Continuous Testing with Test Impact Analysis – Part 2](https://blogs.msdn.microsoft.com/visualstudioalm/2017/05/16/accelerated-continuous-testing-with-test-impact-analysis-part-2/), 16 May 2017 11 | 3. [Accelerated Continuous Testing with Test Impact Analysis – Part 3](https://blogs.msdn.microsoft.com/devops/2017/06/13/accelerated-continuous-testing-with-test-impact-analysis-part-3/), 13 June 2017 12 | 4. [Accelerated Continuous Testing with Test Impact Analysis – Part 4](https://blogs.msdn.microsoft.com/devops/2017/08/04/accelerated-continuous-testing-with-test-impact-analysis-part-4/), 4 August 2017 13 | -------------------------------------------------------------------------------- /SplitCoverageFile/SplitCoverageFile.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27906.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SplitCoverageFile", "SplitCoverageFile\SplitCoverageFile.csproj", "{05CB8A53-B0F3-48CC-B90F-FC25B65538A0}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {05CB8A53-B0F3-48CC-B90F-FC25B65538A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {05CB8A53-B0F3-48CC-B90F-FC25B65538A0}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {05CB8A53-B0F3-48CC-B90F-FC25B65538A0}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {05CB8A53-B0F3-48CC-B90F-FC25B65538A0}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {A5008367-9511-4511-9C2B-A37C29F7B642} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SplitCoverageFile/SplitCoverageFile/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SplitCoverageFile/SplitCoverageFile/InvalidCoverageFileException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SplitCoverageFile 8 | { 9 | /// 10 | /// The exception for invalid coverage files. 11 | /// 12 | [global::System.Serializable] 13 | public class InvalidCoverageFileException : Exception 14 | { 15 | public InvalidCoverageFileException() { } 16 | public InvalidCoverageFileException(string message) : base(message) { } 17 | public InvalidCoverageFileException(string message, Exception inner) : base(message, inner) { } 18 | protected InvalidCoverageFileException( 19 | System.Runtime.Serialization.SerializationInfo info, 20 | System.Runtime.Serialization.StreamingContext context) 21 | : base(info, context) 22 | { } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SplitCoverageFile/SplitCoverageFile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SplitCoverageFile")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SplitCoverageFile")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("05cb8a53-b0f3-48cc-b90f-fc25b65538a0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SplitCoverageFile/SplitCoverageFile/Ref/x64/Debug/Microsoft.VisualStudio.Coverage.Analysis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/SplitCoverageFile/SplitCoverageFile/Ref/x64/Debug/Microsoft.VisualStudio.Coverage.Analysis.dll -------------------------------------------------------------------------------- /SplitCoverageFile/SplitCoverageFile/Ref/x64/Debug/Microsoft.VisualStudio.Coverage.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/SplitCoverageFile/SplitCoverageFile/Ref/x64/Debug/Microsoft.VisualStudio.Coverage.Interop.dll -------------------------------------------------------------------------------- /TIAonDatadrivenTests/Math/Adder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Math 8 | { 9 | public class Adder 10 | { 11 | public int add(int x, int y) 12 | { 13 | return x + y;// 14 | } 15 | 16 | public float add(float x, float y) 17 | { 18 | return x + y; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/Math/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/Math/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Math")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Math")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6a94b205-672a-4cda-ae2e-4dc01ccbefdf")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/Math/Subtractor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Math 8 | { 9 | public class Subtractor 10 | { 11 | public int sub(int x, int y) 12 | { 13 | return x - y; 14 | } 15 | 16 | public float sub(float x, float y) 17 | { 18 | return x - y; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/MathTests/AddTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using Math; 4 | 5 | namespace MathTests 6 | { 7 | [TestClass] 8 | public class AddTests 9 | { 10 | [TestMethod] 11 | public void atm_int() 12 | { 13 | int x = 2; 14 | int y = 3; 15 | int sum = 5; 16 | 17 | int res = new Math.Adder().add(x, y); 18 | Assert.AreEqual(sum, res); 19 | } 20 | 21 | [TestMethod] 22 | public void atm_float() 23 | { 24 | float x = 2.0f; 25 | float y = 3.0f; 26 | float sum = 5.0f; 27 | 28 | float res = new Math.Adder().add(x, y); 29 | Assert.AreEqual(sum, res); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/MathTests/DatadrivenAddTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace MathTests 5 | { 6 | [TestClass] 7 | public class DatadrivenAddTests 8 | { 9 | [TestMethod] 10 | [DataRow(2, 2, 4)] 11 | [DataRow(2, 3, 5)] 12 | [DataRow(2, 4, 6)] 13 | [DataRow(2, 5, 7)] 14 | public void dd_atm_int(int x, int y, int sum) 15 | { 16 | int res = new Math.Adder().add(x, y); 17 | Assert.AreEqual(sum, res); 18 | } 19 | 20 | [TestMethod] 21 | [DataRow(2.0f, 2.0f, 4.0f)] 22 | [DataRow(2.0f, 3.0f, 5.0f)] 23 | [DataRow(2.0f, 4.0f, 6.0f)] 24 | [DataRow(2.0f, 5.0f, 7.0f)] 25 | public void dd_atm_float(float x, float y, float sum) 26 | { 27 | float res = new Math.Adder().add(x, y); 28 | Assert.AreEqual(sum, res); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/MathTests/DatadrivenSubTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace MathTests 5 | { 6 | [TestClass] 7 | public class DatadrivenSubTests 8 | { 9 | [TestMethod] 10 | [DataRow(2, 2, 0)] 11 | [DataRow(2, 3, -1)] 12 | [DataRow(2, 4, -2)] 13 | [DataRow(2, 5, -3)] 14 | public void dd_stm_int(int x, int y, int sum) 15 | { 16 | int res = new Math.Subtractor().sub(x, y); 17 | Assert.AreEqual(sum, res); 18 | } 19 | 20 | [TestMethod] 21 | [DataRow(2.0f, 2.0f, 0.0f)] 22 | [DataRow(2.0f, 3.0f, -1.0f)] 23 | [DataRow(2.0f, 4.0f, -2.0f)] 24 | [DataRow(2.0f, 5.0f, -3.0f)] 25 | public void dd_stm_float(float x, float y, float sum) 26 | { 27 | float res = new Math.Subtractor().sub(x, y); 28 | Assert.AreEqual(sum, res); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/MathTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("MathTests")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("MathTests")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("0f8e8996-62ed-40da-87c5-6fe81304cc81")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/MathTests/SubTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using Math; 4 | 5 | namespace MathTests 6 | { 7 | [TestClass] 8 | public class SubTests 9 | { 10 | [TestMethod] 11 | public void stm_int() 12 | { 13 | int x = 2; 14 | int y = 3; 15 | int diff = -1; 16 | 17 | int res = new Math.Subtractor().sub(x, y); 18 | Assert.AreEqual(diff, res); 19 | } 20 | 21 | [TestMethod] 22 | public void stm_float() 23 | { 24 | float x = 2.0f; 25 | float y = 3.0f; 26 | float diff = -1.0f; 27 | 28 | float res = new Math.Subtractor().sub(x, y); 29 | Assert.AreEqual(diff, res); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/MathTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /TIAonDatadrivenTests/TIAonDatadrivenTests.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27512.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Math", "Math\Math.csproj", "{6A94B205-672A-4CDA-AE2E-4DC01CCBEFDF}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MathTests", "MathTests\MathTests.csproj", "{0F8E8996-62ED-40DA-87C5-6FE81304CC81}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {6A94B205-672A-4CDA-AE2E-4DC01CCBEFDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {6A94B205-672A-4CDA-AE2E-4DC01CCBEFDF}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {6A94B205-672A-4CDA-AE2E-4DC01CCBEFDF}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {6A94B205-672A-4CDA-AE2E-4DC01CCBEFDF}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {0F8E8996-62ED-40DA-87C5-6FE81304CC81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {0F8E8996-62ED-40DA-87C5-6FE81304CC81}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {0F8E8996-62ED-40DA-87C5-6FE81304CC81}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {0F8E8996-62ED-40DA-87C5-6FE81304CC81}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {FC804E37-E745-458A-B000-EC77BFCD7E64} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /TIAsample/TIAsample/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace TIAsample 8 | { 9 | public class Class1 10 | { 11 | public string GetName() 12 | { 13 | return "TIA_TIA"; 14 | ; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /TIAsample/TIAsample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TIAsample")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("TIAsample")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c4e5c7f4-5ab4-46eb-bfa0-54498b10d77c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("TIAsampleTest")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("TIAsampleTest")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("3b51a59b-035d-47ad-878f-a44319ea5532")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using TIAsample; 4 | 5 | namespace TIAsampleTest 6 | { 7 | [TestClass] 8 | public class UnitTest1 9 | { 10 | Class1 target = new Class1(); 11 | 12 | [TestMethod] 13 | public void GetNameTest() 14 | { 15 | string name = target.GetName(); 16 | Assert.AreEqual("TIA", name); 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/obj/Debug/TIAsampleTest.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/TIAsample/TIAsampleTest/obj/Debug/TIAsampleTest.csproj.CopyComplete -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/TIAsample/TIAsampleTest/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/TIAsample/TIAsampleTest/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/TIAsample/TIAsampleTest/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /TIAsample/TIAsampleTest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /TimeoutSample/TimeoutSample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28124.53 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimeoutSample", "TimeoutSample\TimeoutSample.csproj", "{75285EBE-330A-4C6C-9563-171ED1195023}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {75285EBE-330A-4C6C-9563-171ED1195023}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {75285EBE-330A-4C6C-9563-171ED1195023}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {75285EBE-330A-4C6C-9563-171ED1195023}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {75285EBE-330A-4C6C-9563-171ED1195023}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /TimeoutSample/TimeoutSample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("TimeoutSample")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("TimeoutSample")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("75285ebe-330a-4c6c-9563-171ed1195023")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /TimeoutSample/TimeoutSample/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace TimeoutSample 5 | { 6 | [TestClass] 7 | public class UnitTest1 8 | { 9 | [AssemblyInitialize] 10 | public static void AssemblyInit(TestContext context) 11 | { 12 | Thread.Sleep(5000); 13 | } 14 | 15 | [ClassInitialize] 16 | public static void ClassInit(TestContext context) 17 | { 18 | Thread.Sleep(3000); 19 | } 20 | 21 | [TestInitialize] 22 | public void TestInit() 23 | { 24 | Thread.Sleep(1000); 25 | } 26 | 27 | // The TimeoutAttribute considers the total time of a test as made up the 28 | // sum of the times of TestInitialize, TestMethod, and TestCleanup. 29 | [TestMethod] 30 | [Timeout(2100)] // if you set this to 2 secs or less, the test execution will be timed out. 31 | public void TestMethod1() 32 | { 33 | // empty 34 | } 35 | 36 | [TestCleanup] 37 | public void TestCleanup() 38 | { 39 | Thread.Sleep(1000); 40 | } 41 | 42 | [ClassCleanup] 43 | public static void ClassCleanup() 44 | { 45 | Thread.Sleep(3000); 46 | } 47 | 48 | [AssemblyCleanup] 49 | public static void AssemblyCleanup() 50 | { 51 | Thread.Sleep(5000); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /TimeoutSample/TimeoutSample/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/StoreLogo.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("UWP_UT_testproject")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("UWP_UT_testproject")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: AssemblyMetadata("TargetPlatform","UAP")] 14 | 15 | // [assembly: AssemblyVersion("1.0.*")] 16 | [assembly: AssemblyVersion("1.0.0.0")] 17 | [assembly: AssemblyFileVersion("1.0.0.0")] 18 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/Properties/UnitTestApp.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/UWP_UT_testproject_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/UWP_UT_testproject_TemporaryKey.pfx -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/UnitTest.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | 5 | namespace UWP_UT_testproject 6 | { 7 | [TestClass] 8 | public class UnitTest1 9 | { 10 | [TestMethod] 11 | public void TestMethod1() 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/UnitTestApp.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/StoreLogo.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/WinMetadata/Windows.winmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/UWP_UT_testproject/UWP_UT_testproject/bin/x86/Debug/AppX/WinMetadata/Windows.winmd -------------------------------------------------------------------------------- /Win10_IoT_Core/Content/RPi3CircuitDiagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Content/RPi3CircuitDiagram.jpg -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/LED_Test_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/LED_Test/LED_Test_TemporaryKey.pfx -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("LED_Test")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("LED_Test")] 10 | [assembly: AssemblyCopyright("Copyright © 2018")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: AssemblyMetadata("TargetPlatform","UAP")] 14 | 15 | // [assembly: AssemblyVersion("1.0.*")] 16 | [assembly: AssemblyVersion("1.0.0.0")] 17 | [assembly: AssemblyFileVersion("1.0.0.0")] 18 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/Properties/UnitTestApp.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/UnitTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | using Win10_IoT_Core; 5 | 6 | namespace UnitTestProject1 7 | { 8 | [TestClass] 9 | public class UnitTest1 10 | { 11 | private static LED led = new Win10_IoT_Core.LED(); 12 | 13 | [TestMethod] 14 | public void TestMethodON() 15 | { 16 | // whatever be the current state, ON the LED 17 | led.turnON(); 18 | Task.Delay(3 * 1000).Wait(); 19 | 20 | // get the state of the LED pin, and assert on it. 21 | var bON = led.State(); 22 | 23 | Assert.IsTrue(bON); 24 | } 25 | 26 | [TestMethod] 27 | public void TestMethodBlink() 28 | { 29 | for (int i = 0; i < 4; ++i) 30 | { 31 | led.turnON(); 32 | Task.Delay(500).Wait(); 33 | 34 | led.turnOFF(); 35 | Task.Delay(100).Wait(); 36 | } 37 | 38 | // get the state of the LED pin, and assert on it. 39 | var bON = led.State(); 40 | 41 | Assert.IsFalse(bON); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Win10_IoT_Core/LED_Test/UnitTestApp.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/LED.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Windows.Devices.Gpio; 3 | 4 | namespace Win10_IoT_Core 5 | { 6 | public class LED 7 | { 8 | private GpioPin pin; 9 | 10 | public LED() 11 | { 12 | InitGPIO(); 13 | } 14 | 15 | private bool InitGPIO() 16 | { 17 | const int LED_PIN = 5; 18 | 19 | var gpio = GpioController.GetDefault(); 20 | 21 | if (gpio == null) 22 | { 23 | pin = null; 24 | return false; 25 | } 26 | 27 | pin = gpio.OpenPin(LED_PIN); 28 | pin.SetDriveMode(GpioPinDriveMode.Output); 29 | return true; 30 | } 31 | 32 | public bool turnON() 33 | { 34 | // Drive the pin to low to have current flow into the LED 35 | pin.Write(GpioPinValue.Low); 36 | return State(); 37 | } 38 | 39 | public bool turnOFF() 40 | { 41 | pin.Write(GpioPinValue.High); 42 | return State(); 43 | } 44 | 45 | public bool State() 46 | { 47 | var val = pin.Read(); 48 | 49 | if (val == GpioPinValue.Low) 50 | return true; 51 | else 52 | return false; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 17 | 18 | namespace Win10_IoT_Core 19 | { 20 | /// 21 | /// An empty page that can be used on its own or navigated to within a Frame. 22 | /// 23 | public sealed partial class MainPage : Page 24 | { 25 | public MainPage() 26 | { 27 | this.InitializeComponent(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Win10_IoT_Core")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Win10_IoT_Core")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Win10_IoT_Core.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 30F105C9-681E-420b-A277-7C086EAD8A4E 5 | false 6 | 10.171.44.67 7 | Universal 8 | true 9 | 10 | -------------------------------------------------------------------------------- /Win10_IoT_Core/Win10_IoT_Core/Win10_IoT_Core_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/Win10_IoT_Core/Win10_IoT_Core/Win10_IoT_Core_TemporaryKey.pfx -------------------------------------------------------------------------------- /Win10_IoT_Core/readme.md: -------------------------------------------------------------------------------- 1 | # Build status 2 | | |Debug | 3 | |:----------:|:----------------:| 4 | |**master** || 5 | 6 | # Sample 7 | This is the sample code to go along with the blog post: [DevOps for IoT with Win10 IoT Core, UWP, and VSTS](https://blogs.msdn.microsoft.com/devops/2018/03/07/devops-for-iot-with-win10-iot-core-uwp-and-vsts/). 8 | -------------------------------------------------------------------------------- /java/hw/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | * 4 | * This generated file contains a sample Java Library project to get you started. 5 | * For more details take a look at the Java Libraries chapter in the Gradle 6 | * user guide available at https://docs.gradle.org/4.5.1/userguide/java_library_plugin.html 7 | */ 8 | 9 | plugins { 10 | // Apply the java-library plugin to add support for Java Library 11 | id 'java-library' 12 | } 13 | 14 | dependencies { 15 | // This dependency is exported to consumers, that is to say found on their compile classpath. 16 | api 'org.apache.commons:commons-math3:3.6.1' 17 | 18 | // This dependency is used internally, and not exposed to consumers on their own compile classpath. 19 | implementation 'com.google.guava:guava:23.0' 20 | 21 | // Use JUnit test framework 22 | testImplementation 'junit:junit:4.12' 23 | } 24 | 25 | // In this section you declare where to find the dependencies of your project 26 | repositories { 27 | // Use jcenter for resolving your dependencies. 28 | // You can declare any Maven/Ivy/file repository here. 29 | jcenter() 30 | } 31 | 32 | sourceSets { 33 | main { 34 | java { 35 | srcDir 'src/main' 36 | } 37 | } 38 | 39 | test { 40 | java { 41 | srcDir 'src/test' // Note @Peter's comment below 42 | } 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /java/hw/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pvlakshm/Samples/858a664dd2a0d9f779dd8207e089bb78a31f2919/java/hw/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /java/hw/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip 6 | -------------------------------------------------------------------------------- /java/hw/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | * 4 | * The settings file is used to specify which projects to include in your build. 5 | * 6 | * Detailed information about configuring a multi-project build in Gradle can be found 7 | * in the user guide at https://docs.gradle.org/4.5.1/userguide/multi_project_builds.html 8 | */ 9 | 10 | rootProject.name = 'hw' 11 | -------------------------------------------------------------------------------- /java/hw/src/main/java/Library.java: -------------------------------------------------------------------------------- 1 | public class Library 2 | { 3 | public int add(int x, int y) 4 | { 5 | return x + y; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /java/hw/src/test/java/LibraryTest.java: -------------------------------------------------------------------------------- 1 | import org.junit.Test; 2 | import static org.junit.Assert.*; 3 | 4 | 5 | public class LibraryTest 6 | { 7 | @Test 8 | public void addTest() 9 | { 10 | int x = 5; 11 | int y = 6; 12 | int sum = 11; 13 | 14 | Library l = new Library(); 15 | int res = l.add(x, y); 16 | 17 | assertEquals(sum, res); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /maven/fix-styles.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Vsts test coverage view doesn't load external CSS due to security reasons. 3 | * So we are converting all external css files to internal