Skip to content

Commit

Permalink
Generics review the code and UT #79
Browse files Browse the repository at this point in the history
- created new folder for generisc example
  • Loading branch information
mpostol committed Jun 3, 2018
1 parent 416761a commit 7ea9d16
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Lecture/Lecture/Lecture.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
<Compile Include="ExtensionMethods.cs" />
<Compile Include="FileExample.cs" />
<Compile Include="FromClause.cs" />
<Compile Include="Generics.cs" />
<Compile Include="LessonGenerics\Generics.cs" />
<Compile Include="InterfaceExample.cs" />
<Compile Include="LinqExtensions.cs" />
<Compile Include="Node.cs" />
<Compile Include="LessonGenerics\Node.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reflection\AssemblyModel.cs" />
<Compile Include="Reflection\ClassModel.cs" />
Expand All @@ -81,7 +81,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Generics.md" />
<None Include="LessonGenerics\Generics.md" />
</ItemGroup>
<ItemGroup>
<Page Include="TreeViewExample\MainWindow.xaml">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System;
using System.Collections.Generic;

namespace TP.Lecture
namespace TP.Lecture.LessonGenerics
{
/// <summary>
/// Class Generics - an example og generics.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TP.Lecture
namespace TP.Lecture.LessonGenerics
{
class Node<ClassA>
{
Expand Down
7 changes: 4 additions & 3 deletions Lecture/Lesson2UnitTest/GenericsUnitTest.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using TP.Lecture.LessonGenerics;

namespace TP.Lecture.UnitTest
{
[TestClass]
public class GenericsUnitTest
{
[TestMethod]
public void AfterCreatioValueTestMethod()
public void AfterCreationValueTestMethod()
{
Generics<int> _intInstance = new Generics<int>();
Assert.AreEqual<int>(default(int), _intInstance.DefaultValue);
}
[TestMethod]
public void AfterCreatioReferenceTestMethod()
public void AfterCreationReferenceTestMethod()
{
Generics<AnyClass> _intInstance = new Generics<AnyClass>();
//Assert.AreEqual<int>(0, _intInstance.DefaultValue);
Expand Down

0 comments on commit 7ea9d16

Please sign in to comment.