Exemplo n.º 1
0
        public void SettingOnInstanceAllowsSettingCBFields(string intent, string version)
        {
            Chatbase.FBAgentMessage msg = new Chatbase.FBAgentMessage
            {
                intent  = intent,
                version = version
            };
            FBChatbaseFields cbFields = msg.SetChatbaseFields().GetChatbaseFields();

            Assert.Equal(cbFields.intent, intent);
            Assert.Equal(cbFields.version, version);
        }
Exemplo n.º 2
0
        public void SettingOnInstanceAllowsSettingCBFields(string intent, string version, bool nh, bool fb)
        {
            Chatbase.FBUserMessage msg = new Chatbase.FBUserMessage
            {
                intent      = intent,
                version     = version,
                not_handled = nh,
                feedback    = fb
            };
            FBChatbaseFields cbFields = msg.SetChatbaseFields().GetChatbaseFields();

            Assert.Equal(cbFields.intent, intent);
            Assert.Equal(cbFields.version, version);
            Assert.Equal(cbFields.not_handled, nh);
            Assert.Equal(cbFields.feedback, fb);
        }