Skip to content

Commit c8aa9dc

Browse files
author
Tharindu Abeygunawardana
committed
Init
0 parents  commit c8aa9dc

File tree

152 files changed

+37791
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+37791
-0
lines changed

.gitignore

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
9+
# Build results
10+
11+
[Dd]ebug/
12+
[Rr]elease/
13+
x64/
14+
build/
15+
[Bb]in/
16+
[Oo]bj/
17+
18+
# MSTest test Results
19+
[Tt]est[Rr]esult*/
20+
[Bb]uild[Ll]og.*
21+
22+
*_i.c
23+
*_p.c
24+
*.ilk
25+
*.meta
26+
*.obj
27+
*.pch
28+
*.pdb
29+
*.pgc
30+
*.pgd
31+
*.rsp
32+
*.sbr
33+
*.tlb
34+
*.tli
35+
*.tlh
36+
*.tmp
37+
*.tmp_proj
38+
*.log
39+
*.vspscc
40+
*.vssscc
41+
.builds
42+
*.pidb
43+
*.log
44+
*.scc
45+
46+
47+
# Visual C++ cache files
48+
ipch/
49+
*.aps
50+
*.ncb
51+
*.opensdf
52+
*.sdf
53+
*.cachefile
54+
55+
# Visual Studio profiler
56+
*.psess
57+
*.vsp
58+
*.vspx
59+
60+
# Guidance Automation Toolkit
61+
*.gpState
62+
63+
# ReSharper is a .NET coding add-in
64+
_ReSharper*/
65+
*.[Rr]e[Ss]harper
66+
*.idea
67+
68+
# TeamCity is a build add-in
69+
_TeamCity*
70+
71+
# DotCover is a Code Coverage Tool
72+
*.dotCover
73+
74+
# NCrunch
75+
*.ncrunch*
76+
.*crunch*.local.xml
77+
78+
# Installshield output folder
79+
[Ee]xpress/
80+
81+
# DocProject is a documentation generator add-in
82+
DocProject/buildhelp/
83+
DocProject/Help/*.HxT
84+
DocProject/Help/*.HxC
85+
DocProject/Help/*.hhc
86+
DocProject/Help/*.hhk
87+
DocProject/Help/*.hhp
88+
DocProject/Help/Html2
89+
DocProject/Help/html
90+
91+
# Click-Once directory
92+
publish/
93+
94+
# Publish Web Output
95+
*.Publish.xml
96+
*.pubxml
97+
98+
# NuGet Packages Directory
99+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
100+
packages/
101+
102+
# Windows Azure Build Output
103+
csx
104+
*.build.csdef
105+
106+
# Windows Store app package directory
107+
AppPackages/
108+
109+
# Others
110+
sql/
111+
*.Cache
112+
ClientBin/
113+
[Ss]tyle[Cc]op.*
114+
~$*
115+
*~
116+
*.dbmdl
117+
*.[Pp]ublish.xml
118+
*.pfx
119+
*.publishsettings
120+
121+
# RIA/Silverlight projects
122+
Generated_Code/
123+
124+
# Backup & report files from converting an old project file to a newer
125+
# Visual Studio version. Backup files are not needed, because we have git ;-)
126+
_UpgradeReport_Files/
127+
Backup*/
128+
UpgradeLog*.XML
129+
UpgradeLog*.htm
130+
131+
# SQL Server files
132+
App_Data/*.mdf
133+
App_Data/*.ldf
134+
App_Data/*.db
135+
136+
137+
#LightSwitch generated files
138+
GeneratedArtifacts/
139+
_Pvt_Extensions/
140+
ModelManifest.xml
141+
142+
# =========================
143+
# Windows detritus
144+
# =========================
145+
146+
# Windows image file caches
147+
Thumbs.db
148+
ehthumbs.db
149+
150+
# Folder config file
151+
Desktop.ini
152+
153+
# Recycle Bin used on file shares
154+
$RECYCLE.BIN/
155+
156+
# Mac desktop service store files
157+
.DS_Store

Ndot.Tests/DlBarCodeParserTests.cs

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using System;
2+
using Microsoft.VisualStudio.TestTools.UnitTesting;
3+
using Ndot.Helpers;
4+
5+
namespace Ndot.Tests
6+
{
7+
[TestClass]
8+
public class DlBarCodeParserTests
9+
{
10+
[TestMethod]
11+
public void GivenNvBarCode_ReturnsNeededFields()
12+
{
13+
var dl = @"@
14+
ANSI 636049030002DL00410264ZN03050088DLDCAC
15+
DCBA
16+
DCDNONE
17+
DBA03282016
18+
DCSJONES
19+
DCTMIKE D
20+
DBD03102012
21+
DBB03281988
22+
DBC1
23+
DAYBLK
24+
DAU068 in
25+
DAG331 MAIN ST
26+
DAILAS VEGAS
27+
DAJNV
28+
DAK891296069
29+
DAQ1402041243
30+
DCF000122820260394621628
31+
DCGUSA
32+
DCHNONE
33+
DAH
34+
DAZBLACK
35+
DCE3
36+
DCK0009682849901
37+
DCU
38+
ZNZNAN
39+
ZNB10102008
40+
ZNC5'08''
41+
ZND150
42+
ZNENCDL
43+
ZNFNCDL
44+
ZNGN
45+
ZNH00096828499
46+
ZNI00000003399";
47+
48+
var result = DlBarCodeParser.Parse(dl);
49+
50+
Assert.AreEqual(result.FirstName, "MIKE");
51+
Assert.AreEqual(result.MiddleInitial, "D");
52+
Assert.AreEqual(result.LastName, "JONES");
53+
Assert.AreEqual(result.Street, "331 MAIN ST");
54+
Assert.AreEqual(result.City, "LAS VEGAS");
55+
Assert.AreEqual(result.State, "NV");
56+
Assert.AreEqual(result.Dob, DateTime.Parse("03/28/1988"));
57+
Assert.AreEqual(result.DriverLicenseNumber, "1402041243");
58+
Assert.AreEqual(result.DriverLicenseState, "NV");
59+
}
60+
}
61+
}

Ndot.Tests/EdmundsApiTests.cs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using Microsoft.VisualStudio.TestTools.UnitTesting;
3+
using Ndot.Helpers;
4+
5+
namespace Ndot.Tests
6+
{
7+
[TestClass]
8+
public class EdmundsApiTests
9+
{
10+
[TestMethod]
11+
public void GivenVinForNissanSentra_GetsCorrectData()
12+
{
13+
IEdmundsApiAgent apiAgent = new EdmundsApiAgent();
14+
const string vin = "3N1CB51D13L802315";
15+
16+
var data = apiAgent.GetVinData(vin);
17+
18+
Assert.AreEqual("2003", data.Year);
19+
Assert.AreEqual("Nissan_Sentra", data.Make);
20+
Assert.AreEqual("Car", data.BodyType);
21+
}
22+
}
23+
}

Ndot.Tests/Ndot.Tests.csproj

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectGuid>{493A295F-C597-4327-9E37-56417569F2F9}</ProjectGuid>
7+
<OutputType>Library</OutputType>
8+
<AppDesignerFolder>Properties</AppDesignerFolder>
9+
<RootNamespace>Ndot.Tests</RootNamespace>
10+
<AssemblyName>Ndot.Tests</AssemblyName>
11+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
15+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
16+
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
17+
<IsCodedUITest>False</IsCodedUITest>
18+
<TestProjectType>UnitTest</TestProjectType>
19+
</PropertyGroup>
20+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="System" />
39+
</ItemGroup>
40+
<Choose>
41+
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
42+
<ItemGroup>
43+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
44+
</ItemGroup>
45+
</When>
46+
<Otherwise>
47+
<ItemGroup>
48+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
49+
</ItemGroup>
50+
</Otherwise>
51+
</Choose>
52+
<ItemGroup>
53+
<Compile Include="DlBarCodeParserTests.cs" />
54+
<Compile Include="Properties\AssemblyInfo.cs" />
55+
<Compile Include="EdmundsApiTests.cs" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<ProjectReference Include="..\Ndot\Ndot.csproj">
59+
<Project>{D439A506-A30B-488E-8EF7-2A72FE90B2D6}</Project>
60+
<Name>Ndot</Name>
61+
</ProjectReference>
62+
</ItemGroup>
63+
<ItemGroup>
64+
<None Include="app.config" />
65+
</ItemGroup>
66+
<Choose>
67+
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
68+
<ItemGroup>
69+
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
70+
<Private>False</Private>
71+
</Reference>
72+
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
73+
<Private>False</Private>
74+
</Reference>
75+
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
76+
<Private>False</Private>
77+
</Reference>
78+
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
79+
<Private>False</Private>
80+
</Reference>
81+
</ItemGroup>
82+
</When>
83+
</Choose>
84+
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
85+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
86+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
87+
Other similar extension points exist, see Microsoft.Common.targets.
88+
<Target Name="BeforeBuild">
89+
</Target>
90+
<Target Name="AfterBuild">
91+
</Target>
92+
-->
93+
</Project>

Ndot.Tests/Properties/AssemblyInfo.cs

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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("Ndot.Tests")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Ndot.Tests")]
13+
[assembly: AssemblyCopyright("Copyright © 2013")]
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("8f07a3a3-ce09-4fa3-9fa1-a848f2bbf3cd")]
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")]

Ndot.Tests/app.config

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
12+
</dependentAssembly>
13+
</assemblyBinding>
14+
</runtime>
15+
<appSettings>
16+
<add key="EdmundsApiKey" value="6cvn5e75g98gkhy7ugetha3c" />
17+
</appSettings>
18+
</configuration>

0 commit comments

Comments
 (0)