private void LoadCmbClass()
        {
            ClassController classController = new ClassController();
            List <CLASS>    classes         = classController.GetAll();

            cmbClass.ValueMember   = "IDCLASS";
            cmbClass.DisplayMember = "NAME";
            cmbClass.DataSource    = classes;
        }
Beispiel #2
0
        public void GetAll_UnderNormalConditions_DoesNotReturnNull()
        {
            // Arrange
            Mock.Arrange(() => _classService.GetAll()).Returns(_mockClassList).OccursOnce();
            var classController = new ClassController(_classService);

            //// Act
            var result = (OkNegotiatedContentResult <List <ClassDto> >)classController.GetAll();

            var actualResult = result.Content;

            //// Assert
            Assert.IsNotNull(actualResult);
            Assert.That(actualResult.Count, Is.GreaterThan(1));
            Mock.Assert(_classService);
        }