Ejemplo n.º 1
0
        public void CanImplicitlyDeserializeHelloMessage()
        {
            var messageContent = @"{""type"":""hello""}";

            var parser = new ResponseParser();
            var result = parser.DeserializeEvent(messageContent) as Hello;

            Assert.NotNull(result);
            Assert.Equal(EventType.Hello, result.Type);
        }
Ejemplo n.º 2
0
        public void CanImplicitlyDeserializeHelloMessage()
        {
            var messageContent = @"{""type"":""hello""}";

            var parser = new ResponseParser();
            var result = parser.DeserializeEvent(messageContent) as Hello;

            Assert.NotNull(result);
            Assert.Equal(EventType.Hello, result.Type);
        }
Ejemplo n.º 3
0
        public void CanImplicitlyDeserializeMeMessage()
        {
            var messageContent = @"{""type"":""message"",""subtype"":""me_message""}";

            var parser = new ResponseParser();
            var result = parser.DeserializeEvent(messageContent) as MeMessage;

            Assert.NotNull(result);
            Assert.Equal(EventType.Message, result.Type);
            Assert.Equal(MessageSubType.MeMessage, result.Subtype);
        }
Ejemplo n.º 4
0
        public void CanImplicitlyDeserializeMeMessage()
        {
            var messageContent = @"{""type"":""message"",""subtype"":""me_message""}";

            var parser = new ResponseParser();
            var result = parser.DeserializeEvent(messageContent) as MeMessage;

            Assert.NotNull(result);
            Assert.Equal(EventType.Message, result.Type);
            Assert.Equal(MessageSubType.MeMessage, result.Subtype);
        }