Saimoe.Core.ContestantService.GetContestant C# (CSharp) Метод

GetContestant() публичный Метод

Get contestant registration info by given google plus id
public GetContestant ( string googlePlusId ) : Contestant
googlePlusId string
Результат Saimoe.Models.Contestant
        public Contestant GetContestant(string googlePlusId)
        {
            if (string.IsNullOrEmpty(googlePlusId))
            {
                throw new ArgumentNullException("GPlus Id");
            }

            return _contestantRepository.GetContestant(googlePlusId);
        }

Usage Example

        public void TestUpdateContestant()
        {
            var gPlusId = "107711263447378891785";
            var contestantService = new ContestantService();
            var expect = contestantService.GetContestant(gPlusId);

            expect.Profile.Tagline = expect.Profile.Tagline + DateTime.Now.Minute;
            expect.Profile.Interest = expect.Profile.Interest + DateTime.Now.Minute;
            expect.Profile.Characteristic = expect.Profile.Characteristic + DateTime.Now.Minute;
            expect.Profile.RegistrationPost = expect.Profile.RegistrationPost + DateTime.Now.Minute;
            expect.Profile.ActingCute = expect.Profile.ActingCute + DateTime.Now.Minute;
            expect.Profile.JoinedDate = DateTime.Now;
            var contestantService1 = new ContestantService();
            contestantService1.UpdateContestantProfile(gPlusId, expect.Profile);

            var actual = contestantService1.GetContestant(gPlusId);
            Assert.AreEqual(expect.Profile.Tagline, actual.Profile.Tagline);
            Assert.AreEqual(expect.Profile.ActingCute, actual.Profile.ActingCute);
            Assert.AreEqual(expect.Profile.Interest, actual.Profile.Interest);
            Assert.AreEqual(expect.Profile.Characteristic, actual.Profile.Characteristic);
            Assert.AreEqual(expect.Profile.RegistrationPost, actual.Profile.RegistrationPost);
            Assert.AreEqual(expect.Profile.JoinedDate, actual.Profile.JoinedDate);
        }
All Usage Examples Of Saimoe.Core.ContestantService::GetContestant