Improved filtering implemented.
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
using System.Linq;
|
||||
using MileageTraker.Web.Models;
|
||||
using MileageTraker.Web.Utility;
|
||||
using MileageTraker.Web.ViewModels;
|
||||
using MileageTraker.Web.ViewModels.CreateLog;
|
||||
using MileageTraker.Web.ViewModels.Log;
|
||||
using MiscUtil.Collections;
|
||||
using NUnit.Framework;
|
||||
using ImportLogViewModel = MileageTraker.Web.ViewModels.Log.ImportLogViewModel;
|
||||
|
||||
@@ -108,5 +106,15 @@ namespace Web.Tests.Utility
|
||||
{
|
||||
typeof (MileageLogType).ParseWithDisplayNames("None");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void YearMonthGroupTest()
|
||||
{
|
||||
var range = new Range<DateTime>(new DateTime(2011, 2, 4), new DateTime(2013, 6, 23));
|
||||
var monthsBetween = range.FromStart(d => d.AddMonths(1));
|
||||
var yearMonthList = CustomExtensions.YearMonthList(monthsBetween);
|
||||
Assert.That(yearMonthList, Has.Count.EqualTo(3));
|
||||
Assert.That(yearMonthList["2013"], Has.Count.EqualTo(6));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user