Ejemplo n.º 1
0
        public void RemoveFlag_ShouldChainMultipleFlags()
        {
            _status = _status.AddFlag(MessageStatus.Sent).AddFlag(MessageStatus.Received).RemoveFlag(MessageStatus.New);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.True);
        }
Ejemplo n.º 2
0
        public void AddFlag_ShouldAddSingleFlag()
        {
            _status = _status.AddFlag(MessageStatus.Sent);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
        }
Ejemplo n.º 3
0
        public void RemoveFlag_ShouldRemoveSingleFlag()
        {
            _status = _status.RemoveFlag(MessageStatus.New);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
        }
Ejemplo n.º 4
0
        public void RemoveFlag_ShouldRemoveSingleFlag()
        {
            _status = _status.RemoveFlag(MessageStatus.New);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
        }
Ejemplo n.º 5
0
        public void RemoveFlag_ShouldChainMultipleFlags()
        {
            _status = _status.AddFlag(MessageStatus.Sent).AddFlag(MessageStatus.Received).RemoveFlag(MessageStatus.New);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.False);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.True);
        }
Ejemplo n.º 6
0
        public void AddFlag_ShouldAddSingleFlag()
        {
            _status = _status.AddFlag(MessageStatus.Sent);

            Assert.That(_status.HasFlag(MessageStatus.New), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
        }
Ejemplo n.º 7
0
        public void AddFlag_ShouldChainMultipleFlags()
        {
            status = status.AddFlag(MessageStatus.Sent).AddFlag(MessageStatus.Received);

            Assert.That(status.HasFlag(MessageStatus.New), Is.True);
            Assert.That(status.HasFlag(MessageStatus.Sent), Is.True);
            Assert.That(status.HasFlag(MessageStatus.Received), Is.True);
        }
Ejemplo n.º 8
0
 public void Enum_ShouldHaveInitialFlagState()
 {
     Assert.That(_status.HasFlag(MessageStatus.New), Is.True);
     Assert.That(_status.HasFlag(MessageStatus.Sent), Is.False);
     Assert.That(_status.HasFlag(MessageStatus.Received), Is.False);
 }