Skip to content

Commit

Permalink
Generics review the code and UT fixes #79
Browse files Browse the repository at this point in the history
  • Loading branch information
mpostol committed Jul 18, 2018
1 parent 96729b3 commit bb1aac3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//____________________________________________________________________________

using Microsoft.VisualStudio.TestTools.UnitTesting;
using TP.DependencyInjection.UnitTest.Instrumentation;
using TP.Introduction.Instrumentation;

namespace TP.DependencyInjection
namespace TP.Introduction
{
[TestClass]
public class ConstructorInjectionUnitTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using TP.Introduction.Instrumentation;

namespace TP.DependencyInjection
namespace TP.Introduction
{
[TestClass]
public class PropertyInjectionUnitTest
Expand Down
9 changes: 5 additions & 4 deletions Lecture/P2.DataSemantics/DataSemantics/DataSemantics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>IDE0001,IDE0002,IDE0003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -43,14 +44,14 @@
<Compile Include="AnonymousTypes.cs" />
<Compile Include="BasicTypesStruct.cs" />
<Compile Include="FileExample.cs" />
<Compile Include="Generics\Generics.cs" />
<Compile Include="Generics\Node.cs" />
<Compile Include="Generics\NodeEnumerable.cs" />
<Compile Include="InterfaceExample.cs" />
<Compile Include="LessonGenerics\Generics.cs" />
<Compile Include="LessonGenerics\Node.cs" />
<Compile Include="LessonGenerics\NodeEnumerable.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="LessonGenerics\Generics.md" />
<None Include="Generics\Generics.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;

namespace TP.DataSemantics.LessonGenerics
namespace TP.DataSemantics.Generics
{
/// <summary>
/// Class Generics - an example og generics.
Expand Down
2 changes: 1 addition & 1 deletion Lecture/P2.DataSemantics/DataSemantics/Generics/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// To be in touch join the community at GITTER: https://gitter.im/mpostol/TP
//____________________________________________________________________________

namespace TP.DataSemantics.LessonGenerics
namespace TP.DataSemantics.Generics
{
public class Node<ValueTypeParameter>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Collections;
using System.Collections.Generic;

namespace TP.DataSemantics.LessonGenerics
namespace TP.DataSemantics.Generics
{
public class NodeEnumerable<ValueTypeParameter> : Node<ValueTypeParameter>, IEnumerable<ValueTypeParameter>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>IDE0001,IDE0002,IDE0003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using TP.DataSemantics.LessonGenerics;
using TP.DataSemantics.Generics;

namespace TP.DataSemantics
{
Expand All @@ -24,13 +24,11 @@ public void AfterCreationValueTestMethod()
public void AfterCreationReferenceTestMethod()
{
Generics<AnyClass> _intInstance = new Generics<AnyClass>();
//Assert.AreEqual<int>(0, _intInstance.DefaultValue);
Assert.IsNull(_intInstance.DefaultValue);
}
[TestMethod]
public void DictionaryCreatorTestMethod()
{
//SelfDictionary<AnyClass> _dictionPrim = new SelfDictionary<AnyClass>();
SelfDictionary<EquatableNotImplemented> _dictionSecond = new SelfDictionary<EquatableNotImplemented>();
}
[TestMethod]
Expand Down

0 comments on commit bb1aac3

Please sign in to comment.