Exemple #1
0
        public void souldReturnFacsetSecuritiesWhenAddProject()
        {
            _projects = new ProjectCollection();

            var newProject = new ProjectTest.Builder()
                             .WithName("Facset")
                             .WithCode("ggn-001")
                             .Build();

            var expectedProject = new ProjectTest.Builder()
                                  .WithName("Facset-Securities")
                                  .WithCode("ggn-001")
                                  .Build();

            _projects.Add(newProject);

            Project firsElement;

            using (var e = _projects.GetEnumerator())
            {
                e.MoveNext();
                firsElement = e.Current;
            }

            Assert.True(firsElement.Name.Equals(expectedProject.Name));
        }
Exemple #2
0
        public void souldAddNewItemToCollection()
        {
            var newProject = new ProjectTest.Builder()
                             .WithName("Facset")
                             .WithCode("ggn-001")
                             .Build();

            _projects.Add(newProject);

            var expectedProjectsNumber = 1;

            Assert.Equal(expectedProjectsNumber, _projects.Count);
        }
Exemple #3
0
        public void ShouldReturn2ElementsInList()
        {
            _projects = new ProjectList();

            var expectedProjectNumber = 2;

            var newProject = new ProjectTest.Builder()
                             .WithName("Facset")
                             .WithCode("ggn-001")
                             .Build();

            var newProject2 = new ProjectTest.Builder()
                              .WithName("Sentry")
                              .WithCode("ggn-002")
                              .Build();

            _projects.Add(newProject);
            _projects.Add(newProject2);

            var currentProjectNumber = _projects.Count;

            Assert.Equal(expectedProjectNumber, currentProjectNumber);
        }