Exemple #1
0
        public void Init()
        {
            var fdps = new List <FDP>
            {
                new FDP {
                    Name = "FDP 1", FDPID = 1, AdminUnitID = 4, NameAM = "FDP AND"
                },
                new FDP {
                    Name = "FDP 2", FDPID = 2, AdminUnitID = 4, NameAM = "FDP Hulet"
                },
            };
            var fdpService       = new Mock <IFDPService>();
            var adminUnitService = new Mock <IAdminUnitService>();

            fdpService.Setup(t => t.GetAllFDP()).Returns(fdps);
            _fdpController = new FDPController(fdpService.Object, adminUnitService.Object);
        }
Exemple #2
0
        public void Init()
        {
            var fdp = new List <FDP>
            {
                new FDP()
                {
                    FDPID = 1, Name = "fdp1", AdminUnitID = 1
                },
                new FDP()
                {
                    FDPID = 2, Name = "fdp2", AdminUnitID = 2
                },
                new FDP()
                {
                    FDPID = 3, Name = "fdp3", AdminUnitID = 3
                },
            };
            var adminUnit = new List <AdminUnit>
            {
                new AdminUnit()
                {
                    AdminUnitID = 1, Name = "adminUnit1"
                },
                new AdminUnit()
                {
                    AdminUnitID = 2, Name = "adminUnit2"
                },
                new AdminUnit()
                {
                    AdminUnitID = 3, Name = "adminUnit3"
                }
            };

            var fdpService = new Mock <IFDPService>();

            fdpService.Setup(t => t.GetAllFDP()).Returns(fdp);
            var adminUnitService = new Mock <IAdminUnitService>();

            adminUnitService.Setup(t => t.GetAllAdminUnit()).Returns(adminUnit);

            _fdpController = new FDPController(adminUnitService.Object, fdpService.Object);
        }