Question: i need help fixing my code. assignment: Using a combination of Boundary Analysis and Equivalence Partitions create the set of test cases to test the

i need help fixing my code. assignment: Using a combination of Boundary Analysis and Equivalence Partitions create the set of test cases to test the function:
bool IsLeap(int year)
Which test whether the year is a leap year as per the rule of the Gregorian Calendar.
Name your Test Cases TestMethodX where X is a counter starting from 1.
Notes:
Using this will generate a test cases for all the boundaries in each partition and their corresponding +/-1 for a total of 15 test cases.
Even though you may implement the function to test your code locally, only submit the test cases to the system. code: using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
[TestClass]
public partial class LeapTesting
{
// Your code starts here
[TestMethod]
public void TestMethod1()=> Assert.IsFalse(IsLeap(1599)); // Not divisible by 4, near boundary
[TestMethod]
public void TestMethod2()=> Assert.IsTrue(IsLeap(1600)); // Divisible by 4, leap year
[TestMethod]
public void TestMethod3()=> Assert.IsFalse(IsLeap(1596)); // Divisible by 100, but not 400, not a leap year
[TestMethod]
public void TestMethod4()=> Assert.IsTrue(IsLeap(2000)); // Divisible by 400, leap year
[TestMethod]
public void TestMethod5()=> Assert.IsFalse(IsLeap(1900)); //-1 from a year not divisible by 4
[TestMethod]
public void TestMethod6()=> Assert.IsTrue(IsLeap(2000)); //+4 from a leap year (not special case)
[TestMethod]
public void TestMethod7()=> Assert.IsFalse(IsLeap(1800)); // Just below the leap year divisible by 4
[TestMethod]
public void TestMethod8()=> Assert.IsTrue(IsLeap(2400)); // Divisible by 100, but not 400
[TestMethod]
public void TestMethod9()=> Assert.IsFalse(IsLeap(2401)); // Divisible by 4, not a century, leap year
[TestMethod]
public void TestMethod10()=> Assert.IsTrue(IsLeap(2404)); // Just above divisible by 100, not a leap year
[TestMethod]
public void TestMethod11()=> Assert.IsFalse(IsLeap(2100)); // Just below divisible by 4
[TestMethod]
public void TestMethod12()=> Assert.IsTrue(IsLeap(2400)); // Divisible by 400, leap year
[TestMethod]
public void TestMethod13()=> Assert.IsFalse(IsLeap(2200)); // Divisible by 100, not by 400, not a leap year
[TestMethod]
public void TestMethod14()=> Assert.IsFalse(IsLeap(1500)); // Divisible by 4, leap year (recent example)
[TestMethod]
public void TestMethod15()=> Assert.IsFalse(IsLeap(2500)); // Just after a leap year
// Your code ends here
}Feedback
(Succeeded)(5/5 points): Passed TestMethod1
(Succeeded)(5/5 points): Passed TestMethod2
(Failed)(0/5 points): Passed TestMethod3
(Failed)(0/5 points): Passed TestMethod4
(Failed)(0/5 points): Passed TestMethod5
(Failed)(0/5 points): Passed TestMethod6
(Failed)(0/5 points): Passed TestMethod7
(Failed)(0/5 points): Passed TestMethod8
(Failed)(0/5 points): Passed TestMethod9
(Failed)(0/5 points): Passed TestMethod10
(Failed)(0/5 points): Passed TestMethod11
(Failed)(0/5 points): Passed TestMethod12
(Failed)(0/5 points): Passed TestMethod13
(Failed)(0/5 points): Passed TestMethod14
(Failed)(0/5 points): Passed TestMethod15
(Failed)(0/25 points): Passed zTest
ASSISTANT HINT #1654 for 3
3/12/202413:57
The student's TestMethod3 is testing a case where the year is divisible by 100 but not by 400. This is an equivalence partition, but the test is not covering the correct boundary. The student should test a year that is divisible by 100 and not by 400, but is not the first year in a new century.
Asistant
ASSISTANT HINT #1655 for 4
3/12/202413:57
Your student's code is missing a test case for a year divisible by 100 but not by 400. They should also check if their implementation is correctly handling such years.
Asistant
ASSISTANT HINT #1656 for 5
3/12/202413:57
Make sure to test all boundary cases and their corresponding +/-1 values. Check if the test cases cover all possible scenarios.
Asistant
ASSISTANT HINT #1657 for 6
3/12/202413:57
The student's code seems to be missing some test cases. Make sure to include test cases for all the boundaries in each partition and their corresponding +/-1 for a total of 15 test cases. Also, check if the student's implementation of the IsLeap function is correct.
Asistant
ASSISTANT HINT #1658 for 7
3/12/202413:57
The student's test cases are missing some important boundary cases. Consider the year just below the leap year divisible by 4 and the year just above the year divisible by 100 but not by 400. These cases are not covered in the student's test cases.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!