public void TestGetCoreDataReturnsNullIfNoDataInDatabase()
        {
            var mock = new Moq.Mock<GroupDataReader>();
            var grouping = Grouping();

            mock.Setup(x => x
                .GetCoreData(grouping, timePeriod, areaCode))
                .Returns(new List<CoreDataSet>());

            SimpleCoreDataSetProvider provider = new SimpleCoreDataSetProvider(Area(), mock.Object);
            Assert.IsNull(provider.GetData(grouping, timePeriod, null/*metadata not used*/));
        }
        public void TestGetCoreDataReturnsCoreDataSetIfMatchingRowInDatabase()
        {
            double val = 3;
            var mock = new Moq.Mock<GroupDataReader>();
            var grouping = Grouping();

            mock.Setup(x => x
                .GetCoreData(grouping, timePeriod, areaCode))
                .Returns(new List<CoreDataSet> { new CoreDataSet { Value = val } });

            SimpleCoreDataSetProvider provider = new SimpleCoreDataSetProvider(Area(), mock.Object);
            var data = provider.GetData(grouping, timePeriod, null/*metadata not used*/);
            Assert.AreEqual(val, data.Value);
        }