コード例 #1
0
        public void state_controller_adds_state_successfully()
        {
            var count         = builder.States.Count();
            var nonEmptyCount = nonEmptyBuilder.States.Count();

            Assert.AreEqual(0, count);
            Assert.AreEqual(1, nonEmptyCount);
            builder.AddState(new TestState());
            nonEmptyBuilder.AddState(new TestState());
            count         = builder.States.Count();
            nonEmptyCount = nonEmptyBuilder.States.Count();
            Assert.AreEqual(1, count);
            Assert.AreEqual(2, nonEmptyCount);
        }
コード例 #2
0
 public void Setup()
 {
     _state          = new TestState();
     builder         = new StateControllerBuilder <TestState, TestContext>();
     nonEmptyBuilder = new StateControllerBuilder <TestState, TestContext>();
     nonEmptyBuilder.AddState(_state);
 }