Example #1
0
        public void LoadCommentsTest()
        {
            Global.TOKEN = "39217616.abb738d.964d271718624e29a213d5b8d602ccf7";
            var            container   = UnityContainerSuppor.BuildUnityContainer();
            var            instance    = container.Resolve <InstagramBussinessImpl>();
            EndpointImpl   endpoint    = new EndpointImpl(instance);
            List <Comment> listComment = new List <Comment>();

            Task.Run(async() =>
            {
                listComment = await endpoint.LoadComments("1593619934200949826_5964438851");
            }).Wait();


            Assert.IsTrue(listComment.Count > 0);
        }
Example #2
0
        public void LoadCommentsTest1()
        {
            Global.TOKEN = "5964438851.abb738d.8d2695e0f6624fc9ab2c37dd02f841cd";
            var            container   = UnityContainerSuppor.BuildUnityContainer();
            var            instance    = container.Resolve <InstagramBussinessImpl>();
            EndpointImpl   endpoint    = new EndpointImpl(instance);
            List <Comment> listComment = new List <Comment>();
            Exception      exception   = null;

            Task.Run(async() =>
            {
                try
                {
                    listComment = await endpoint.LoadComments("");
                }catch (Exception ex)
                {
                    exception = ex;
                }
            }).Wait();


            Assert.IsNotNull(exception);
        }