public void AssertBiggestSwing_ReturnsNullIfZero(Func <Task <SwingDao> > func) { var zeroSwing = new SwingDao { BiggestSwing = 0, StartTime = DateTime.Now.AddMonths(-1), EndTime = DateTime.Now.AddMonths(-1).AddHours(2) }; DatabaseMock.Swing = zeroSwing; Assert.IsNull(func().Result); }
private void AssertBiggestSwing_Works(Func <Task <SwingDao> > func) { var expected = new SwingDao { BiggestSwing = 100, StartTime = DateTime.Now.AddMonths(-1), EndTime = DateTime.Now.AddMonths(-1).AddHours(2) }; DatabaseMock.Swing = expected; var actual = func().Result; Assert.IsTrue( new SwingComparer().Equals(expected, actual) ); }