Пример #1
0
        public void ConvertToStringTest1(Sex?input, string?expected)
        {
            var conv = new SexConverter();

            string?result = conv.ConvertToString(input);

            Assert.AreEqual(expected, result);
        }
Пример #2
0
 public AccFacebook(AccIua accIua)
 {
     email     = accIua.Email;
     firstName = accIua.FirstName;
     lastName  = accIua.LastName;
     password  = accIua.Password;
     dateBirth = accIua.DateBirth;
     sex       = SexConverter.ConvertToSexIua(accIua.Sex);
 }
Пример #3
0
        public void ParseTest1(string?input, Sex expected)
        {
            var conv = new SexConverter();

            var result = (Sex?)conv.Parse(input);

            Assert.IsNotNull(result);

            Assert.AreEqual(expected, result);
        }
 public AccGoogle(AccIua accIua)
 {
     firstName  = accIua.FirstName;
     lastName   = accIua.LastName;
     login      = accIua.Login;
     domen      = "google.com";
     password   = accIua.Password;
     sex        = SexConverter.ConvertToSexIua(accIua.Sex);
     sexString  = accIua.Sex.ToString();
     email      = login + "@" + domen;
     dateBirth  = accIua.DateBirth;
     alterEmail = accIua.Email;
 }
        private PortableUserDto MakePortableUserDto(User user)
        {
            var portableUserDto = _mapper.Map <PortableUserDto>(user);

            portableUserDto.CountryName       = CountryConverter.GetCountryEnglish(user.Country);
            portableUserDto.SexType           = SexConverter.GetSexEnglish(user.Sex);
            portableUserDto.ChallengeGiven    = user.GivenChallenges.Count;
            portableUserDto.ChallengeReceived = user.ReceivedChallenges.Count;
            portableUserDto.RetrievalDate     = DateTime.Now;
            portableUserDto.Workouts          = MakePortableWorkoutDto(user.Workouts);
            portableUserDto.BirthDay          = user.BirthDate;
            portableUserDto.CreationDate      = user.CreationDate;


            return(portableUserDto);
        }
 public Info GetFirstLastNameInfo(SexIua sex, string type = "namefamily")
 {
     return(GetFirstLastNameInfo(SexConverter.ConvertToSexIua(sex), type));
 }
Пример #7
0
        public void ConvertToStringTest2()
        {
            var conv = new SexConverter();

            _ = conv.ConvertToString("Hi!");
        }