public void TestMethod_2_minutes() { TimeSpan source = new TimeSpan(0, 0, 2, 0); const string expected = "2 minutes"; string result = DeleteFunc.ConvertToTimeString(source); Assert.AreEqual(result, expected); }
public void TestMethod_1_second() { TimeSpan source = new TimeSpan(0, 0, 0, 1, 0); const string expected = "1 seconde"; string result = DeleteFunc.ConvertToTimeString(source); Assert.AreEqual(result, expected); }
public void TestMethod_2_seconds_no_millisecond() { TimeSpan source = new TimeSpan(0, 0, 0, 2, 0); const string expected = "2 secondes"; const bool removeZeroArgument = true; string result = DeleteFunc.ConvertToTimeString(source, removeZeroArgument); Assert.AreEqual(result, expected); }
public void TestMethod_0_day_with_zero_argument() { TimeSpan source = new TimeSpan(0, 0, 0, 0, 0); const string expected = "0 jour 0 heure 0 minute 0 seconde 0 milliseconde"; const bool removeZeroArgument = false; string result = DeleteFunc.ConvertToTimeString(source, removeZeroArgument); Assert.AreEqual(result, expected); }