public void Parse_KeepAlive_ShouldParseProperly() { // Act var parsedEvent = ServerEvent.Parse("event: keep-alive", "null"); // Assert Assert.AreEqual(parsedEvent.Type, ServerEventType.KeepAlive); Assert.IsNull(parsedEvent.Data); }
public void Parse_AuthRevoked_ShouldParseProperly() { // Act var parsedEvent = ServerEvent.Parse("event: auth_revoked", "data: sorry m8, you auth was revoked"); // Assert Assert.AreEqual(parsedEvent.Type, ServerEventType.AuthRevoked); Assert.IsNull(parsedEvent.Data); }
public void Parse_Cancel_ShouldParseProperly() { // Act var parsedEvent = ServerEvent.Parse("event: cancel", "null"); // Assert Assert.AreEqual(parsedEvent.Type, ServerEventType.Cancel); Assert.IsNull(parsedEvent.Data); }