Пример #1
0
        public void playing_with_bitflags()
        {
            EngineState state = EngineState.IsRunning
                                | EngineState.IsClutch;

            bool isRunning = state.CheckRunning();

            isRunning.Should().BeTrue();

            state = state.StopEngine();

            state.CheckRunning().Should().BeFalse();

            state.GetSpeed().Should().Be(0);
            state = state.SetSpeed(3);
            state.GetSpeed().Should().Be(3);
        }