public void Test_New() { var fc = new ClockTower (); Assert.AreEqual (0, fc.CurrentTime); Assert.AreEqual (0, fc.PreviousTime); Assert.AreEqual (0, fc.DeltaTime); Assert.AreEqual (0, fc.FrameCount); Assert.AreEqual (0, fc.FrameRate); }
public void Main() { // Do your work here... ClockTower myTower = new ClockTower(1000); myTower.OnChime += new ClockTower.ChimeEventHandler(my_OnChime); // Keep the main thread alive long enough to observe the event. Thread.Sleep(3000); }
public void Test_GetTime() { var fc = new ClockTower (); fc.OnUpdate (33); fc.OnUpdate (66); fc.OnUpdate (100); Assert.AreEqual (100, fc.CurrentTime); Assert.AreEqual (66, fc.PreviousTime); Assert.AreEqual (34, fc.DeltaTime); Assert.AreEqual (3, fc.FrameCount); }
public void Test_GetFrameRate() { var fc = new ClockTower (); fc.OnUpdate (500); fc.OnUpdate (1000); Assert.AreEqual (2, fc.FrameRate); fc.OnUpdate (1500); fc.OnUpdate (1600); fc.OnUpdate (2000); Assert.AreEqual (3, fc.FrameRate); }
public Test() { clock = new ClockTower(); person = new Person(clock); }