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); }
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); }
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); }
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); }
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); }