public void SetUp()
 {
     testDataHelper = new TestDataHelper();
     constituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));
     testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.AgnesAlba()));
     constituentData = new ConstituentData { Gender = "F", BornOn = DateTime.Now, BranchName = new BranchTypeData { Id = 1, Description = "Kallivayalil" }, MaritialStatus = 1 };
     constituentData.Name = new ConstituentNameData {FirstName = "James", LastName = "Franklin", Salutation = new SalutationTypeData {Id = 1, Description = "Mr"}};
 }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            constituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));
            reciprocalConstituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.AgnesAlba()));
            savedAssociation = testDataHelper.CreateAssociation(AsociationMother.JamesFranklinAndJessicaAlba(constituent,reciprocalConstituent));
        }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();
            var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
            savedConstituent = testDataHelper.CreateConstituent(constituent);

            constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.AgnesAlba());
            savedAssociatedConstituent = testDataHelper.CreateConstituent(constituent);

            savedAssociation = testDataHelper.CreateAssociation(AsociationMother.JamesFranklinAndParent(savedConstituent));

            associationRepository = new AssociationRepository(testDataHelper.session);
        }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            constituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));
            savedAddress = testDataHelper.CreateAddress(AddressMother.SanFrancisco(constituent));
        }
 public void SetUp()
 {
     testDataHelper = new TestDataHelper();
     uploadFileRepository = new UploadFileRepository();
     constituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));
     savedUpload = testDataHelper.CreateUpload(UploadMother.Test(constituent));
 }
示例#6
0
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            savedConstituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));
            testDataHelper.CreatePhone(PhoneMother.PrimaryMobile(savedConstituent));
        }
 public void Setup()
 {
     testDataHelper = new TestDataHelper();
     var constituentWithName = ConstituentMother.ConstituentWithName(ConstituentNameMother.AgnesAlba());
     constituentWithName.BranchName = BranchTypeMother.Anavalaril();
     constituentWithName.HouseName = "xyz";
     savedConstituent = testDataHelper.CreateConstituent(constituentWithName);
 }
 public void SetUp()
 {
     testDataHelper = new TestDataHelper();
     committeeRepository = new CommitteeRepository(testDataHelper.session);
     var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
     savedConstituent = testDataHelper.CreateConstituent(constituent);
     savedCommittee = testDataHelper.CreateCommittee(CommitteeMother.President(savedConstituent));
 }
 public void SetUp()
 {
     testDataHelper = new TestDataHelper();
     var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
     savedConstituent = testDataHelper.CreateConstituent(constituent);
     educationDetailRepository = new EducationDetailRepository(testDataHelper.session);
     savedEducationalDetail = testDataHelper.CreateEducationDetail(EducationDetailMother.School(savedConstituent));
 }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            constituent1 = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));

            testDataHelper.CreateUpload(UploadMother.Test(constituent1));
        }
 public void SetUp()
 {
     testDataHelper = new TestDataHelper();
     var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
     savedConstituent = testDataHelper.CreateConstituent(constituent);
     savedAddress = testDataHelper.CreateAddress(AddressMother.SanFrancisco(savedConstituent));
     occupationRepository = new OccupationRepository(testDataHelper.session);
     savedOccupation = testDataHelper.CreateOccupation(OccupationMother.Doctor(savedConstituent, savedAddress));
 }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();
            var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
            savedConstituent = testDataHelper.CreateConstituent(constituent);
            savedAddress = testDataHelper.CreateAddress(AddressMother.SanFrancisco(savedConstituent));

            addressRepository = new AddressRepository(testDataHelper.session);
        }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            constituent = new Constituent {Gender = "M", BornOn = DateTime.Today, BranchName = BranchTypeMother.Kallivayalil(), MaritialStatus = 1, IsRegistered = 'N'};
            constituent.Name = ConstituentNameMother.JamesFranklin();
            savedConstituent = testDataHelper.CreateConstituent(constituent);

            constituentRepository = new ConstituentRepository();
        }
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            jamesFranklin = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
            savedConstituent = testDataHelper.CreateConstituent(jamesFranklin);

            savedEvent = testDataHelper.CreateEvent(EventMother.Anniversary());
            eventRepository = new EventRepository();
        }
示例#15
0
        public void ShouldSendMailForForgotPassword()
        {
            testDataHelper = new TestDataHelper();
            var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
            var savedConstituent = testDataHelper.CreateConstituent(constituent);
            var email = testDataHelper.CreateEmail(EmailMother.Personal(savedConstituent, true));
            var login = testDataHelper.CreateUser(LoginMother.User(email, "Pass", false));

            var response = HttpHelper.DoHttpGet(string.Format("{0}?email={1}", "http://localhost/kallivayalilService/KallivayalilService.svc/Login/ForgotPassword",email.Address));
            Assert.That(response.StatusCode,Is.EqualTo(HttpStatusCode.OK));
        }
示例#16
0
        public void ShouldLoadExistingLogin()
        {
            testDataHelper = new TestDataHelper();
            var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());

            var savedConstituent = testDataHelper.CreateConstituent(constituent);
            var email = testDataHelper.CreateEmail(EmailMother.Official(savedConstituent));
            var login = testDataHelper.CreateUser(LoginMother.User(email, "Pass", false));

            var emailData = HttpHelper.Get<LoginData>(string.Format("{0}?username={1}", "http://localhost/kallivayalilService/KallivayalilService.svc/Login", email.Address));

            Assert.That(emailData.Id, Is.GreaterThan(0));
        }
示例#17
0
        public void ShouldUpdateExistingUser()
        {
            testDataHelper = new TestDataHelper();
            var constituent = ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin());
            var savedConstituent = testDataHelper.CreateConstituent(constituent);
            var email = testDataHelper.CreateEmail(EmailMother.Personal(savedConstituent, false));
            var login = testDataHelper.CreateUser(LoginMother.User(email,"Pass",false));

            var loginData = LoginDataMother.User(email,"Pass1",true);
            var updatedData = HttpHelper.Put(string.Format("{0}/{1}", "http://localhost/kallivayalilService/KallivayalilService.svc/Login", login.Id), loginData);

            Assert.That(updatedData.Email.Address, Is.EqualTo(email.Address));
            Assert.That(updatedData.Password, Is.EqualTo("Pass1"));
            Assert.That(updatedData.IsAdmin, Is.EqualTo(true));
        }