public void SignInWrongUser()
        {
            var registrationService = new Registration();
            var response = registrationService.Login("non existing user", "wrong password");

            Assert.IsNull(response);
        }
        public void SignInGoodUser()
        {
            var registrationService = new Registration();
            var response = registrationService.Login("cristi.mie", "parola");

            Assert.AreEqual("d567d1c7-88d1-4ded-8ad3-9b9fc25d3281", response);
        }
Esempio n. 3
0
        public void TestLoginFailed()
        {
            Registration r = new Registration();
            var result = r.Login(Guid.NewGuid().ToString(), "");
            Assert.IsTrue(string.IsNullOrWhiteSpace(result));


        }
        public void PublishContactDetailsNewUserAndPhone()
        {
            var registrationService = new Registration();

            var response = registrationService.PublishContactDetails(
                new ContactDetailsCollection
                {
                    UserGUID = "d567d1c7-88d1-4ded-8ad3-9b9fc25d3281",
                    ContactDetails = new List<ContactDetails>
                                                {
                                                    new ContactDetails { Name = "gigi", Phones = new List<string> { "07245432233" } }
                                                }
                });

            Assert.IsTrue(response);
        }
        public void PublishContactDetailsWrongGUID()
        {
            var registrationService = new Registration();
            var response = registrationService.PublishContactDetails(
                new ContactDetailsCollection
                {
                    UserGUID = "unkown user id",
                    ContactDetails = new List<ContactDetails>
                                                {
                                                    new ContactDetails { Name = "gigi", Phones = new List<string> { "07245432233" } }
                                                }
                });

            Assert.IsFalse(response);
                            
        }