public void HasOneLeadImplementerOrNoOrganizationsTest()
        {
            var project = TestFramework.TestProject.Create();

            var primaryContact = TestFramework.TestPerson.Create();

            var organization1 = TestFramework.TestOrganization.Create();

            organization1.PrimaryContactPerson   = primaryContact;
            organization1.PrimaryContactPersonID = primaryContact.PersonID;
            var organization2 = TestFramework.TestOrganization.Create();

            organization2.PrimaryContactPerson   = primaryContact;
            organization2.PrimaryContactPersonID = primaryContact.PersonID;
            var organization3 = TestFramework.TestOrganization.Create();

            organization3.PrimaryContactPerson   = primaryContact;
            organization3.PrimaryContactPersonID = primaryContact.PersonID;

            var projectOrganization1 = TestFramework.TestProjectOrganization.Create(project, organization1);
            var projectOrganization2 = TestFramework.TestProjectOrganization.Create(project, organization2);
            var projectOrganization3 = TestFramework.TestProjectOrganization.Create(project, organization3);


            var projectOrganizations = new List <Models.ProjectOrganization>();
            var viewModel            = new EditOrganizationsViewModel(project, projectOrganizations, Person.CreateNewBlank(Models.Role.Normal));

            //TODO tests
        }
Esempio n. 2
0
        public void HasOneLeadImplementerOrNoOrganizationsTest()
        {
            var project = TestFramework.TestProject.Create();

            var primaryContact = TestFramework.TestPerson.Create();

            var organization1 = TestFramework.TestOrganization.Create("SomeOrg1");

            organization1.PrimaryContactPerson   = primaryContact;
            organization1.PrimaryContactPersonID = primaryContact.PersonID;
            var organization2 = TestFramework.TestOrganization.Create("SomeOrg2");

            organization2.PrimaryContactPerson   = primaryContact;
            organization2.PrimaryContactPersonID = primaryContact.PersonID;
            var organization3 = TestFramework.TestOrganization.Create("SomeOrg3");

            organization3.PrimaryContactPerson   = primaryContact;
            organization3.PrimaryContactPersonID = primaryContact.PersonID;



            var projectOrganization1 = TestFramework.TestProjectOrganization.Create(project, organization1);
            var projectOrganization2 = TestFramework.TestProjectOrganization.Create(project, organization2);
            var projectOrganization3 = TestFramework.TestProjectOrganization.Create(project, organization3);


            var projectOrganizations = new List <ProjectFirmaModels.Models.ProjectOrganization>();
            var viewModel            = new EditOrganizationsViewModel(project, projectOrganizations, TestFramework.TestFirmaSession.Create());

            //TODO tests
        }
Esempio n. 3
0
        public void AllViewModelFieldsAreSetFromConstructorTest()
        {
            // Act
            var viewModel = new EditOrganizationsViewModel(_project, _projectOrganizations, TestFramework.TestFirmaSession.Create());

            // Assert
            Assert.That(viewModel.ProjectOrganizationSimples, Is.Not.Null);
        }
        public void AllViewModelFieldsAreSetFromConstructorTest()
        {
            // Act
            var viewModel = new EditOrganizationsViewModel(_project, _projectOrganizations, Person.CreateNewBlank(Models.Role.Normal));

            // Assert
            Assert.That(viewModel.ProjectOrganizationSimples, Is.Not.Null);
        }