コード例 #1
0
 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"}};
 }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

            constituent = testDataHelper.CreateConstituent(ConstituentMother.ConstituentWithName(ConstituentNameMother.JamesFranklin()));
            savedAddress = testDataHelper.CreateAddress(AddressMother.SanFrancisco(constituent));
        }
コード例 #5
0
 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));
        }
コード例 #7
0
 public void Setup()
 {
     testDataHelper = new TestDataHelper();
     var constituentWithName = ConstituentMother.ConstituentWithName(ConstituentNameMother.AgnesAlba());
     constituentWithName.BranchName = BranchTypeMother.Anavalaril();
     constituentWithName.HouseName = "xyz";
     savedConstituent = testDataHelper.CreateConstituent(constituentWithName);
 }
コード例 #8
0
 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));
 }
コード例 #9
0
 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));
 }
コード例 #10
0
        public void SetUp()
        {
            testDataHelper = new TestDataHelper();

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

            testDataHelper.CreateUpload(UploadMother.Test(constituent1));
        }
コード例 #11
0
 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));
 }
コード例 #12
0
        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);
        }
コード例 #13
0
        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();
        }
コード例 #14
0
        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));
        }