Exemple #1
0
            public void ShouldSetBaseAddressToApiWhenHttpFactoryIsUsed()
            {
                var configuration = new LineConfiguration()
                {
                    ChannelAccessToken = "ChannelAccessToken",
                    ChannelSecret      = "ChannelSecret",
                };

                ILineBot bot = new LineBot(configuration);

                var field  = bot.GetType().GetRuntimeFields().Where(f => f.Name == "_client").First();
                var client = (HttpClient)field.GetValue(bot);

                Assert.AreEqual(new Uri("https://api.line.me/v2/bot/"), client.BaseAddress);
            }
        public void Constructor_HttpFactoryIsUsed_BaseAddressUsesApi()
        {
            LineConfiguration configuration = new LineConfiguration()
            {
                ChannelAccessToken = "ChannelAccessToken",
                ChannelSecret      = "ChannelSecret",
            };

            ILineBot bot = new LineBot(configuration);

            FieldInfo  field  = bot.GetType().GetRuntimeFields().Where(f => f.Name == "_client").First();
            HttpClient client = (HttpClient)field.GetValue(bot);

            Assert.AreEqual(new Uri("https://api.line.me/v2/bot/"), client.BaseAddress);
        }
Exemple #3
0
 public GameListMatcher(LineBot lineBot)
 {
     _lineBot = lineBot;
 }
Exemple #4
0
 public void SetLineBot(LineBot lineBot)
 {
     _lineBot = lineBot;
 }
 public BindMatcher(LineBot lineBot)
 {
     _lineBot = lineBot;
 }
 public WelcomeMatcher(LineBot lineBot)
 {
     _lineBot = lineBot;
 }