public void ItParsesValuesProperly() { var expected = new DevicePowerChanged(); var actual = EventTypeParser.Parse("Device Power Changed"); Assert.That(actual.GetType(), Is.EqualTo(expected.GetType())); }
public void ItThrowsExceptionsWhenParsingValidInput(string input) { EventTypeParser.Parse(input); }
public void ItRejectsMalformedInput(string input) { var result = EventTypeParser.IsValid(input); Assert.That(result, Is.False); }
public void ItAcceptsWellFormedInput(string input) { var result = EventTypeParser.IsValid(input); Assert.That(result, Is.True); }
public static bool IsEventType(this IParameter parameter) { return(EventTypeParser.IsValid(parameter.Value)); }
public static IEventType ToEventType(this IParameter parameter) { return(EventTypeParser.Parse(parameter.Value)); }