コード例 #1
0
 public void GetIsFinished()
 {
     IStatistic target = new LocationStatistic()
     {
         Start = new DateTime(2012, 9, 14, 0, 14, 0),
     };
     Assert.IsFalse(target.IsFinished());
 }
コード例 #2
0
 public StatisticManager(IRepositoryFactory repositoryFactory, Location location)
 {
     _repositoryFactory = repositoryFactory;
     _current = new LocationStatistic()
                    {
                        Start = DateTime.Now,
                        Location = location
                    };
     lock (location)
         location.StatisticsList.Add(_current);
 }
コード例 #3
0
 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);
 }