public void EnumPreviousTest() { var model = new GenericStateModel <Fixture>(Fixture.Qux); Assert.AreEqual(Fixture.Qux, model.GetCurrent()); model.Previous(); Assert.AreEqual(Fixture.Baz, model.GetCurrent()); model.Previous(); model.Previous(); Assert.AreEqual(Fixture.Foo, model.GetCurrent()); model.Previous(); model.Previous(); Assert.AreEqual(Fixture.Foo, model.GetCurrent()); }
public void EnumNextTest() { var model = new GenericStateModel <Fixture>(); Assert.AreEqual(default(Fixture), model.GetCurrent()); model.Next(); model.Next(); Assert.AreEqual(Fixture.Baz, model.GetCurrent()); model.Next(); Assert.AreEqual(Fixture.Qux, model.GetCurrent()); model.Next(); model.Next(); Assert.AreEqual(Fixture.Qux, model.GetCurrent()); }