pszczyg

Untitled

Jun 20th, 2017
293
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Test]
  2. public void Meters_Are_Checked_In_Desired_Time()
  3. {
  4.     var meterLoader = new Mock<IAmActiveMetersLoader>();
  5.     meterLoader.Setup(x => x.ReloadAllActiveMeters()).Returns(() => new List<long> {1, 2, 3});
  6.     var sut = PrepareSystemUnderTest(meterLoader);
  7.     sut.DoPeriodicCheckIfNeeded();
  8.  
  9.     meterLoader.Verify(x => x.ReloadAllActiveMeters(), Times.Exactly(1));
  10. }
RAW Paste Data