public void _0_ifStateChangeEventCalled() { // arrange var test = new GroundDetectionControl(); var eventCall = 0; test.OnStateChanges += (b) => { eventCall++; }; // act test.OnGround = true; // assert Assert.IsTrue(eventCall == 1); }
private void ArrangeTestEnvironment(short airJump, float jumpForce, bool onGround) { _testModel = new JumpModel() { AirJumpLimit = airJump, JumpForce = jumpForce }; _testObj = new JumpControl(_testModel.Value); _testGroundCheck = new GroundDetectionControl { OnGround = onGround }; _testObj.GroundDetection = _testGroundCheck; }
public void TearDown() { _testModel = null; _testObj = null; _testGroundCheck = null; }