public void IsOneOfShouldNotMatchInvalidList() { var message = new PlainMessage() { Type = EventType.ChannelCreated }; var matches = new[] { EventType.ImClose, EventType.PinAdded, EventType.ChannelLeft, EventType.CommandsChanged, EventType.ManualPresenceChange }; var result = EventMessageExtensions.IsOneOf(message, matches); Assert.False(result); }
public void IsOneOfShouldMatchValidList() { var message = new PlainMessage() { Type = EventType.Hello }; var matches = new[] { EventType.AccountsChanged, EventType.ChannelCreated, EventType.ChannelLeft, EventType.CommandsChanged, EventType.Hello }; var result = EventMessageExtensions.IsOneOf(message, matches); Assert.True(result); result = EventMessageExtensions.IsOneOf(message, EventType.Hello); Assert.True(result); }