Exemple #1
0
        public void Alllow_ChangeState_usingEnum()
        {
            var foro = new Foro(".Pattern Enum example");

            //Compiling does not give error and allows us to introduce invalid characters
            foro.ChangeState((ForoState)3);
            foro.StateEnum.Should().Be(3);
        }
Exemple #2
0
        public void Alllow_ChangeState_usingSealed()
        {
            var foro = new Foro(".Pattern Enum example");

            // The Compiling does a give error and  not allows us to introduce invalid characters
            //foro.ChangeState((State)3);
            foro.ChangeState(State.Closed);

            foro.StateSealead.Should().Be(State.Closed);
        }