Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1a42f47
Added some test generated directories that should be ignored.
MarkMichaelis Sep 7, 2022
8887378
Added top level statement and refactored PowerShellTestsUtilities
MarkMichaelis Sep 9, 2022
6599558
Refactored PowerShellTestsUtilities into a solution shared file.
MarkMichaelis Sep 26, 2022
ce65ab1
Minor rename of PowerShellTestUtilities
MarkMichaelis Sep 26, 2022
bbcde0b
Excluded "HelloWorld" files
MarkMichaelis Sep 26, 2022
71540fb
PowerShell Core by Default
MarkMichaelis Sep 27, 2022
af47206
Fixed failing tests (from inattention to detail refactoring)
MarkMichaelis Sep 30, 2022
f3c8045
Minor refactoring
MarkMichaelis Sep 30, 2022
6c07a44
Replaced left over debugging line with non-hard-coded path.
MarkMichaelis Sep 30, 2022
870fe0b
Powershell refactoring
MarkMichaelis Sep 30, 2022
19f7498
Updated ClassCleanup to use refactored method.
MarkMichaelis Oct 1, 2022
908c83d
Bump Microsoft.CodeAnalysis.CSharp.Scripting from 4.3.0 to 4.3.1 (#367)
dependabot[bot] Oct 3, 2022
f53cd42
Added top level statement and refactored PowerShellTestsUtilities
MarkMichaelis Sep 9, 2022
4c0e910
Refactored PowerShellTestsUtilities into a solution shared file.
MarkMichaelis Sep 26, 2022
f5bf5e1
Excluded "HelloWorld" files
MarkMichaelis Sep 26, 2022
0d4f088
Powershell refactoring
MarkMichaelis Sep 30, 2022
347c53a
Updated ClassCleanup to use refactored method.
MarkMichaelis Oct 1, 2022
0c2c805
Added top level statement and refactored PowerShellTestsUtilities
MarkMichaelis Sep 9, 2022
f68803d
Refactored PowerShellTestsUtilities into a solution shared file.
MarkMichaelis Sep 26, 2022
c73469c
Minor rename of PowerShellTestUtilities
MarkMichaelis Sep 26, 2022
ab90c13
Excluded "HelloWorld" files
MarkMichaelis Sep 26, 2022
933212d
Added a Listing 01.01A as a top level statement.
MarkMichaelis Sep 26, 2022
c01f45e
Added top level statement
MarkMichaelis Oct 1, 2022
9be5f77
Minor edit
MarkMichaelis Oct 1, 2022
5001135
Minor addition of Path.Join()
MarkMichaelis Oct 2, 2022
cd1f76c
Added support to only test HelloWorld ps1 execution output when compi…
MarkMichaelis Oct 2, 2022
e419742
Started initial draft with top level statement for initial listing
MarkMichaelis Oct 3, 2022
fe1ffa2
Updated for C# 10
MarkMichaelis Oct 11, 2022
488e2c4
Updated to reflect VS new project generated file.
MarkMichaelis Oct 11, 2022
e913625
Added comments to identify various constructs
MarkMichaelis Oct 11, 2022
8a4a699
Bumped version numbers to 11.
MarkMichaelis Oct 11, 2022
42ac94a
Minor updates
MarkMichaelis Oct 22, 2022
05b6209
Upgraded to .net7.0/v11
MarkMichaelis Oct 22, 2022
1d88b36
Merge branch 'v11.0' into TopLevelStatements
MarkMichaelis Oct 22, 2022
4189a53
Updated to use IntelliTect.Multitool to find location
MarkMichaelis Oct 22, 2022
ee345fe
Removed errant file
MarkMichaelis Oct 22, 2022
2b938de
Minor update to csproj file
MarkMichaelis Oct 22, 2022
68a48e4
Added Raw Literal String samples
MarkMichaelis Oct 23, 2022
f1e7b16
Removed CurrentPath dependency
MarkMichaelis Oct 23, 2022
dbec67f
Updated now that we are on C#11/.NET7.0
MarkMichaelis Oct 23, 2022
edeb997
Update src/Shared/Tests/PowerShellTestUtilities.cs
MarkMichaelis Oct 23, 2022
c010b59
Removed Version element from Directory.Build.props - relying soley on…
MarkMichaelis Oct 23, 2022
6ed7de4
Updated to use .NET 6 or higher
MarkMichaelis Oct 24, 2022
8fdef02
Removed System. prefix.
MarkMichaelis Oct 24, 2022
2743d65
Removed stale code
MarkMichaelis Oct 24, 2022
315421a
Renamed HelloWorld class to Program
MarkMichaelis Oct 24, 2022
33f0ef0
Automerge dependabot and add Github actions to dependabot (#374)
BenjaminMichaelis Oct 24, 2022
54151ec
Bump actions/upload-artifact from 2 to 3 (#381)
dependabot[bot] Oct 24, 2022
9324dd2
Bump actions/setup-dotnet from 2 to 3 (#380)
dependabot[bot] Oct 24, 2022
4f1589b
Change extension on test/generated folders to "*.g"
MarkMichaelis Oct 24, 2022
73d3dac
Removed errant indent and whitespace
MarkMichaelis Oct 24, 2022
6569cbf
Added cleanup at start (in addition to end)
MarkMichaelis Oct 24, 2022
8e3f5d4
Change extension on test/generated folders to "*.testing"
MarkMichaelis Oct 24, 2022
029f465
Removed redundant System. namespace qualifier
MarkMichaelis Oct 24, 2022
908df22
Remove unnecessary using declaratives
MarkMichaelis Oct 24, 2022
8c4f0da
Merge branch 'v9.0' into RemoveRedundantNamespacePrefix
MarkMichaelis Oct 29, 2022
b4a84b9
Renumbered Chaper 1 listings
MarkMichaelis Oct 29, 2022
0702d12
Updated with missing semicolons from running ListingManager
MarkMichaelis Oct 29, 2022
d8f0889
Merge branch 'v9.0' into RenumberChapter1Listings
Keboo Oct 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/Chapter01.Tests/Listing01.02C.Tests.cs

This file was deleted.

18 changes: 0 additions & 18 deletions src/Chapter01.Tests/Listing01.02D.Tests.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_02B.Tests
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_03.Tests
{
[TestClass]
public class HelloWorldTests
Expand All @@ -16,4 +16,4 @@ public void Main_UpDown()
expected, HelloWorld.Main);
}
}
}
}
13 changes: 8 additions & 5 deletions src/Chapter01.Tests/Listing01.04.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_04.Tests
{
[TestClass]
public class ProgramTests
public class HelloWorldTests
{
[TestMethod]
public void Main_InigoHello()
{
const string expected = @"Hello, My name is Inigo Montoya";
const string expected =
@"Down
Side
Up";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main);
expected, HelloWorld.Main);
}
}
}
}
14 changes: 7 additions & 7 deletions src/Chapter01.Tests/Listing01.05.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_05.Tests
{
[TestClass]
public class ProgramTests
public class HelloWorldTests
{
[TestMethod]
public void Main_GiveNone_GetZero()
public void Main_InigoHello()
{
int expected = 0;
int value = Program.Main(Array.Empty<string>());
const string expected =
@"Hello. My name is Inigo Montoya.";

Assert.AreEqual(expected, value);
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HelloWorld.Main);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_02E.Tests
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_06.Tests
{
[TestClass]
public class HelloWorldTests
Expand All @@ -15,4 +15,4 @@ public void Main_InigoHello()
expected, Program.Main);
}
}
}
}
12 changes: 6 additions & 6 deletions src/Chapter01.Tests/Listing01.08.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_08.Tests
{
[TestClass]
public class HelloWorldTests
public class ProgramTests
{
[TestMethod]
public void Main_HelloToInigo()
public void Main_InigoHello()
{
const string expected = @"Hello Inigo Montoya";
const string expected = @"Hello, My name is Inigo Montoya";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HelloWorld.Main);
expected, Program.Main);
}
}
}
}
13 changes: 7 additions & 6 deletions src/Chapter01.Tests/Listing01.09.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_09.Tests
{
[TestClass]
public class ProgramTests
{
[TestMethod]
public void Main_HelloToInigo()
public void Main_GiveNone_GetZero()
{
const string expected = @"Hello Inigo Montoya";
int expected = 0;
int value = Program.Main(Array.Empty<string>());

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HelloWorld.Main);
Assert.AreEqual(expected, value);
}
}
}
}
12 changes: 6 additions & 6 deletions src/Chapter01.Tests/Listing01.10.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_10.Tests
{
[TestClass]
public class MiracleMaxTests
public class HelloWorldTests
{
[TestMethod]
public void Main_StormCastleShort()
public void Main_HelloToInigo()
{
const string expected = @"Have fun storming the castle!";
const string expected = @"Hello Inigo Montoya";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, MiracleMax.Main);
expected, HelloWorld.Main);
}
}
}
}
13 changes: 6 additions & 7 deletions src/Chapter01.Tests/Listing01.11.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_11.Tests
{
[TestClass]
public class HelloWorldTests
public class ProgramTests
{
[TestMethod]
public void Main_InigoMantra_ProperOutput()
public void Main_HelloToInigo()
{
const string expected =
@"My name is Inigo Montoya.
You killed my father....";
const string expected = @"Hello Inigo Montoya";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(expected, HelloWorld.Main);
IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HelloWorld.Main);
}
}
}
}
13 changes: 5 additions & 8 deletions src/Chapter01.Tests/Listing01.12.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_12.Tests
{
[TestClass]
public class MiracleMaxTests
{
[TestMethod]
public void Main_StormCastleLong()
public void Main_StormCastleShort()
{
const string expected =
@"Have fun storming the castle!
Think it will work?
It would take a miracle.";
const string expected = @"Have fun storming the castle!";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, StormingTheCastle.Main);
expected, MiracleMax.Main);
}
}
}
}
12 changes: 6 additions & 6 deletions src/Chapter01.Tests/Listing01.13.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_13.Tests
{
[TestClass]
public class Listing01_13_Tests
public class HelloWorldTests
{
[TestMethod]
public void Main_ItWouldTakeAMiracle_OutputWrittenToConsole()
public void Main_InigoMantra_ProperOutput()
{
const string expected =
@"It would take a miracle.";
@"My name is Inigo Montoya.
You killed my father....";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, StormingTheCastle.Main);
IntelliTect.TestTools.Console.ConsoleAssert.Expect(expected, HelloWorld.Main);
}
}
}
}
17 changes: 8 additions & 9 deletions src/Chapter01.Tests/Listing01.14.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_14.Tests
{
[TestClass]
public class HeyYouTests
public class MiracleMaxTests
{
[TestMethod]
public void Main_InputInigoMontoya_WriteNothing()
public void Main_StormCastleLong()
{
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>";
@"Have fun storming the castle!
Think it will work?
It would take a miracle.";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HeyYou.Main);
expected, StormingTheCastle.Main);
}
}
}
}
13 changes: 7 additions & 6 deletions src/Chapter01.Tests/Listing01.15.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_15.Tests
{
[TestClass]
public class ProgramTests
public class Listing01_13_Tests
{
[TestMethod]
public void Main_InputOne_WriteOne()
public void Main_ItWouldTakeAMiracle_OutputWrittenToConsole()
{
const string expected = @"1<<1>>";
const string expected =
@"It would take a miracle.";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main);
expected, StormingTheCastle.Main);
}
}
}
}
10 changes: 5 additions & 5 deletions src/Chapter01.Tests/Listing01.16.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_16.Tests
{
[TestClass]
public class ProgramTests
public class HeyYouTests
{
[TestMethod]
public void Main_InputInigoMontoya_WriteFirstLast()
public void Main_InputInigoMontoya_WriteNothing()
{
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>Your full name is Inigo Montoya.";
>>";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HeyYou.Main);
}
}
}
}
14 changes: 5 additions & 9 deletions src/Chapter01.Tests/Listing01.17.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_17.Tests
{
[TestClass]
public class ProgramTests
{
[TestMethod]
public void Main_InputInigoMontoya_WriteFirstLast()
public void Main_InputOne_WriteOne()
{
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>Your full name is Inigo Montoya.";
const string expected = @"1<<1>>";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, HeyYou.Main);
expected, Program.Main);
}
}
}
}
Loading