From c47737e0e3ea57fdf60b8b76f553654150745042 Mon Sep 17 00:00:00 2001 From: Axel Ahlander Date: Tue, 7 Jan 2025 16:01:06 +0100 Subject: [PATCH 1/2] Small changes to fix bugs --- csharp-fundamentals-class-members.Main/Core.cs | 11 ++++++----- csharp-fundamentals-class-members.Test/CoreTests.cs | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/csharp-fundamentals-class-members.Main/Core.cs b/csharp-fundamentals-class-members.Main/Core.cs index 855e8da..36a0eae 100644 --- a/csharp-fundamentals-class-members.Main/Core.cs +++ b/csharp-fundamentals-class-members.Main/Core.cs @@ -20,21 +20,22 @@ public class Core //TODO: 1. Create an integer member named age with a value of 32 - public int age = 33; + public int age = 32; //TODO: 2. Create a String member named firstName with a value of "Jane" - + public string firstName = "Jane"; + //TODO: 3. Create a boolean member named isProgrammer with a value of true - + public bool isProgrammer = true; //TODO: 4. Change the value below so that the tests pass. Check the README.md file for instructions on // running and reading tests - public int firstNumber = 109; + public int firstNumber = 9182; @@ -45,6 +46,6 @@ public class Core //TODO: 6. Change the visibility below so that the tests pass - private bool isVisible = true; + public bool isVisible = true; } } diff --git a/csharp-fundamentals-class-members.Test/CoreTests.cs b/csharp-fundamentals-class-members.Test/CoreTests.cs index c28afdc..175ab58 100644 --- a/csharp-fundamentals-class-members.Test/CoreTests.cs +++ b/csharp-fundamentals-class-members.Test/CoreTests.cs @@ -45,7 +45,7 @@ public void firstNumberShouldBe9182() public void firstStringShouldBeSpecific() { Core exercise = new Core(); - Assert.AreEqual("Java is to Javascript what car is to carpet.", exercise.firstString); + Assert.AreEqual("Ruby is to Python what car is to carpet.", exercise.firstString); } [Test] From 5cc7ec19b182342436e59c1d2a43e30c2df162a3 Mon Sep 17 00:00:00 2001 From: Axel Ahlander Date: Tue, 7 Jan 2025 16:08:58 +0100 Subject: [PATCH 2/2] Fixed number 5 --- csharp-fundamentals-class-members.Main/Core.cs | 2 +- csharp-fundamentals-class-members.Test/CoreTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp-fundamentals-class-members.Main/Core.cs b/csharp-fundamentals-class-members.Main/Core.cs index 36a0eae..7aeda2d 100644 --- a/csharp-fundamentals-class-members.Main/Core.cs +++ b/csharp-fundamentals-class-members.Main/Core.cs @@ -40,7 +40,7 @@ public class Core //TODO: 5. Change the value below so that the tests pass - public string firstString = "Ruby is to Python what car is to carpet."; + public string firstString = "Java is to Javascript what car is to carpet."; diff --git a/csharp-fundamentals-class-members.Test/CoreTests.cs b/csharp-fundamentals-class-members.Test/CoreTests.cs index 175ab58..c28afdc 100644 --- a/csharp-fundamentals-class-members.Test/CoreTests.cs +++ b/csharp-fundamentals-class-members.Test/CoreTests.cs @@ -45,7 +45,7 @@ public void firstNumberShouldBe9182() public void firstStringShouldBeSpecific() { Core exercise = new Core(); - Assert.AreEqual("Ruby is to Python what car is to carpet.", exercise.firstString); + Assert.AreEqual("Java is to Javascript what car is to carpet.", exercise.firstString); } [Test]