Пример #1
0
        public void GetModuleNullTest()
        {
            var moduleRepository =
                MockHelperBll.GetAllModules(
                    new List <Module>().AsQueryable()
                    );

            var target = new CheckDisableBll
            {
                ModuleRepository = moduleRepository
            };

            var actual = target.GetModule("Labor");

            Assert.Equal(null, actual);
        }
Пример #2
0
        public void GetModuleTrueTest()
        {
            var moduleRepository =
                MockHelperBll.GetAllModules(
                    new List <Module>
            {
                new Module
                {
                    Visible = true,
                    Name    = "Labor"
                }
            }.AsQueryable()
                    );

            var target = new CheckDisableBll
            {
                ModuleRepository = moduleRepository
            };

            var actual = target.GetModule("Labor");

            Assert.Equal("Labor", actual.Name);
            Assert.Equal(true, actual.Visible);
        }