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 1ec953f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 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
{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 1ec953f

Please sign in to comment.