Example #1
0
        public void Delete_createAndDelete_emptyList()
        {
            ITestConfigDA da = new TestConfigDAMock();
            ITestConfigBL bl = new TestConfigBL(da);

            TestConfig tc = new TestConfig();

            tc.Name          = "name";
            tc.InitialSumma  = 1000;
            tc.CommPerc      = 0.01m;
            tc.IsShortEnable = true;
            bl.SaveTestConfig(tc);

            var list = bl.GetTestConfigList().ToList();

            Assert.Single(list);

            bl.DeleteTestConfig(tc.TestConfigID);

            var list1 = bl.GetTestConfigList().ToList();

            Assert.Empty(list1);
        }
Example #2
0
        public void GetList_create_getList()
        {
            ITestConfigDA da = new TestConfigDAMock();
            ITestConfigBL bl = new TestConfigBL(da);

            TestConfig tc = new TestConfig();

            tc.Name          = "name";
            tc.InitialSumma  = 1000;
            tc.CommPerc      = 0.01m;
            tc.IsShortEnable = true;
            bl.SaveTestConfig(tc);

            var list = bl.GetTestConfigList().ToList();

            Assert.Single(list);
            Assert.Equal(tc.TestConfigID, list[0].TestConfigID);
            Assert.Equal(tc.Name, list[0].Name);
        }