コード例 #1
0
        public void GetFbPublicProfileTest()
        {
            FacebookProfileProxy target = new FacebookProfileProxy();
            const long Userid = 1393021216;
            FacebookProfile expected = new FacebookProfile(
                1393021216,
                "Sergiu",
                "Ciumac",
                string.Empty,
                "Sergiu Ciumac",
                "chiumak.serghei",
                true,
                "en-US",
                "http://facebook.com/chiumak.serghei");

            FacebookProfile actual = target.GetFacebookPublicProfileAsync(Userid).Result;
            Assert.AreEqual(expected.FirstName, actual.FirstName);
            Assert.AreEqual(expected.LastName, actual.LastName);
            Assert.AreEqual(expected.Username, actual.Username);
            Assert.AreEqual(expected.Name, actual.Name);
            Assert.AreEqual(expected.Gender, actual.Gender);
            Assert.AreEqual(expected.Locale, actual.Locale);
            Assert.AreEqual(expected.MiddleName, actual.MiddleName);
            Assert.AreEqual(expected.SquarePictureUrl, actual.SquarePictureUrl);
        }
コード例 #2
0
        public void SuccessfulGetFirstName()
        {
            FacebookProfileProxy target = new FacebookProfileProxy();
            const long Userid = 1393021216;
            const string Expected = "Sergiu";

            string actual = target.GetFirstNameAsync(Userid).Result;

            Assert.AreEqual(Expected, actual);
        }
コード例 #3
0
        public void GetLastNameTest()
        {
            FacebookProfileProxy target = new FacebookProfileProxy();
            const long Userid = 1393021216;
            const string Expected = "Ciumac";

            string actual = target.GetLastNameAsync(Userid).Result;

            Assert.AreEqual(Expected, actual);
        }