public void GetIsFinished()
 {
     IStatistic target = new LocationStatistic()
     {
         Start = new DateTime(2012, 9, 14, 0, 14, 0),
     };
     Assert.IsFalse(target.IsFinished());
 }
 public StatisticManager(IRepositoryFactory repositoryFactory, Location location)
 {
     _repositoryFactory = repositoryFactory;
     _current = new LocationStatistic()
                    {
                        Start = DateTime.Now,
                        Location = location
                    };
     lock (location)
         location.StatisticsList.Add(_current);
 }
 public void GetPeriodTest()
 {
     IStatistic target = new LocationStatistic()
                                {
                                    Start=new DateTime(2012,9,14,0,14,0),
                                    End = new DateTime(2012,9,14,1,30,0)
                                };
     TimeSpan expected=new TimeSpan(0,1,16,0);
     var actual=target.GetPeriod();
     Assert.AreEqual(expected,actual);
 }