Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMichaelis committed Sep 12, 2024
1 parent 54cacf1 commit 9d9dbb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Chapter02.Tests/Listing02.09.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Globalization;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_09.Tests;

[TestClass]
Expand All @@ -6,12 +8,14 @@ public class ProgramTests
[TestMethod]
public void Main_WriteBooleanStatements()
{
string currentCultureString = 86540910.21.ToString("C");
var number = 86540910.21;
string currentCultureString = number.ToString("C");
string greekCultureString = number.ToString("C", CultureInfo.GetCultureInfo("el-GR"));
string expected =
$@"86540910.21
$@"{number}
{currentCultureString}
True: {currentCultureString} == {currentCultureString}
86.540.910,21 €";
{greekCultureString}";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main);
Expand Down
1 change: 1 addition & 0 deletions src/Chapter02/Listing02.09.UsingStringFormat.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_09;

using System;
using System.Globalization;

public class Program
Expand Down

0 comments on commit 9d9dbb7

Please sign in to comment.