Beispiel #1
0
        public void ToClassVm_maps_Id()
        {
            var schoolClasses = new List <SchoolClass> {
                new SchoolClass("12B")
                {
                    Id = 12
                }
            };
            var sut = new SchoolClassMapper();

            // Act
            var result = sut.ToClassVm(schoolClasses);

            // Assert
            Assert.That(result.FirstOrDefault().Id, Is.EqualTo(12));
        }
Beispiel #2
0
        public void ToClassVm_maps__SeveralSchoolClasses()
        {
            var schoolClasses = new List <SchoolClass> {
                new SchoolClass("12B")
                {
                    Id = 12
                }, new SchoolClass("11B")
                {
                    Id = 11
                }
            };
            var sut = new SchoolClassMapper();

            // Act
            var result = sut.ToClassVm(schoolClasses);

            // Assert
            Assert.That(result.Count(), Is.EqualTo(2));
        }