public void SetUp()
        {
            subcat = new List <subcategory>
            {
                new subcategory {
                    categoryID = 1, subcategoryID = 1, subcategoryName = "TestSub1"
                },
                new subcategory {
                    categoryID = 1, subcategoryID = 2, subcategoryName = "TestSub2"
                },
                new subcategory {
                    categoryID = 1, subcategoryID = 3, subcategoryName = "TestSub3"
                },
            };
            user = new List <user>
            {
                new user()
                {
                    userID   = 1,
                    email    = "*****@*****.**",
                    gender   = "male",
                    name     = "test",
                    passw    = "test",
                    username = "******",
                    roleID   = 1
                },
                new user()
                {
                    userID   = 2,
                    email    = "*****@*****.**",
                    gender   = "male",
                    name     = "test1",
                    passw    = "test",
                    username = "******",
                    roleID   = 1
                }
            };

            category = new List <category>
            {
                new category()
                {
                    categoryID   = 1,
                    categoryName = "cat1",
                },
                new category()
                {
                    categoryID   = 12,
                    categoryName = "cat2",
                }
            };

            userTest = new List <userTest>
            {
                new userTest()
                {
                    is_Active    = true,
                    marksScored  = 2,
                    statusOfTest = "fail",
                    testID       = 1,
                    userID       = 1,
                    user         = new user {
                        userID = 1, name = "Test1"
                    },
                    userTestID = 1,
                    test       = new test {
                        testID = 1, available = true, duration = TimeSpan.Zero, questions = new List <question> {
                            new question {
                                questionID = 1, testid = 1
                            }
                        }
                    },
                }
            };

            test = new List <test>
            {
                new test()
                {
                    is_Active     = true,
                    testID        = 1,
                    available     = true,
                    duration      = TimeSpan.Zero,
                    subcategoryID = 1
                },
            };

            userTestAnswer = new List <userTestAnswer> {
                new userTestAnswer {
                    srno = 3, userTestID = 9, questionID = 1, question = new question {
                        questionID   = 1,
                        questionText = "your name?",
                        answerType   = 1,
                        option1      = "a",
                        option2      = "b",
                        option3      = "c",
                        option4      = "d",
                        topicID      = 2,
                        testid       = 1,
                    }
                }
            };

            testLogs = new List <testLog> {
                new testLog {
                    testStarted = new DateTime(2014, 12, 1),
                    testEnded   = new DateTime(2015, 12, 1),
                    marksScored = 15,
                    topicID     = 2,
                    userTestID  = 1,
                    testLogID   = 2
                }
            };

            questions = new List <question> {
                new question {
                    questionID   = 1,
                    questionText = "your name?",
                    answerType   = 1,
                    option1      = "a",
                    option2      = "b",
                    option3      = "c",
                    option4      = "d",
                    topicID      = 2,
                    testid       = 1,
                    answer       = "a",
                    marks        = 1,
                    complexity   = 2,
                    created_by   = "xyz",
                    modified_by  = "abc",
                    created_on   = new DateTime(2014, 12, 1),
                    modified_on  = new DateTime(2015, 12, 1),
                    is_Active    = true
                }
            };

            topics = new List <topic> {
                new topic {
                    topicID     = 2,
                    topicName   = "oops",
                    created_by  = "xyz",
                    modified_by = "abc",
                    created_on  = new DateTime(2014, 12, 1),
                    modified_on = new DateTime(2015, 12, 1),
                    is_Active   = true
                }
            };

            userService  = Substitute.For <IUserService>();
            adminService = Substitute.For <IAdminService>();

            bService = new BLLService(userService, adminService);
        }
Exemple #2
0
 public HomeController(IBLLService service)
 {
     _service = service;
 }
Exemple #3
0
 public HomeController(IBLLService service)
 {
     _service = service;
 }
Exemple #4
0
 public FailedStudentsController(IBLLService bService)
 {
     bllService = bService;
 }
 public AdminController(IBLLService service)
 {
     _service = service;
 }
 public UserController()
 {
     bllService = new BLLService();
 }
Exemple #7
0
 public LoginController()
 {
     bllService = new BLLService();
 }
 public HomeController(IBLLService bService)
 {
     bllService = bService;
 }
Exemple #9
0
 public UserTestResultController()
 {
     bllService = new BLLService();
 }
Exemple #10
0
 public ProfileController(IBLLService service)
 {
     _service = service;
 }
 public HomeController()
 {
     bllService = new BLLService();
 }
Exemple #12
0
 public TestController(IBLLService bService)
 {
     bllService = bService;
 }
Exemple #13
0
 public TestController()
 {
     bllService = new BLLService();
 }
Exemple #14
0
 public LoginController(IBLLService bService)
 {
     bllService = bService;
 }
Exemple #15
0
 public DashboardController(IBLLService service)
 {
     _service = service;
 }
Exemple #16
0
 public UserTestResultController(IBLLService bService)
 {
     bllService = bService;
 }
Exemple #17
0
 public DocumentController(IBLLService service)
 {
     _service = service;
 }
Exemple #18
0
 public FailedStudentsController()
 {
     bllService = new BLLService();
 }
Exemple #19
0
 public UserController(IBLLService bService)
 {
     bllService = bService;
 }
Exemple #20
0
 public HomeController(ILogger <HomeController> logger, IBLLService bllservice)
 {
     _logger         = logger;
     _objIBLLService = bllservice;
 }