public string GetValue(string columnName, int rowNumber)
        {
            var test = new Utilties();

            test.ReadTable(TableOne);
            return(test.ReadCell(columnName, rowNumber));
        }
예제 #2
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddAuthorization();
     services.AddControllers();
     services.AddMvc();
     Algorithm.Install(services);
     Nhibernate.Install(services, Configuration);
     ModelBuilder.Install(services);
     Utilties.Install(services);
 }
예제 #3
0
        public async Task Main_Should_Run_For_This_Solution_With_ManualInformation()
        {
            const string args   = "-i " + TestSetup.ThisProjectSolutionPath + @" -j --outfile custom-manual.json --manual-package-information ../../../SampleManualInformation.json";
            var          status = await Program.Main(args.Split(' '));

            status.Should().Be(0);
            var outputFile = new FileInfo("custom-manual.json");

            outputFile.Exists.Should().BeTrue();;
            Utilties.ReadListFromFile <LibraryInfo> (outputFile.FullName)
            .Should().Contain(l => l.PackageName == "ASamplePackage");
        }
예제 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (HasError() == true)
            {
                MessageBox.Show("Errors detected!", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }


            Discount discount = new Discount()
            {
                DiscountID   = _Discount.DiscountID,
                DiscountCode = txtDiscountCode.Text,
                YearLeveLID  = YearLevel.GetYearLevel(cmbEducationLevel.Text, cmbYearLevel.Text).YearLevelID,
                Type         = "PERCENTAGE",
                TotalValue   = Convert.ToDouble(txtTFee.Text) + Convert.ToDouble(txtMFee.Text) + Convert.ToDouble(txtOFee.Text),
                TFee         = Convert.ToDouble(txtTFee.Text),
                MFee         = Convert.ToDouble(txtMFee.Text),
                OFee         = Convert.ToDouble(txtOFee.Text),
                SchoolYearID = Utilties.GetActiveSchoolYear()
            };

            bool result = false;

            result = Discount.InsertUpdateDiscount(discount);



            if (result == true)
            {
                MessageBox.Show("Discount has been successfully saved!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Close();
                Dispose();
            }
            else
            {
                MessageBox.Show("Some error occured while trying to save discount in database!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #5
0
        //[TestCase("1-cli_latency.nes","")] //Needs APU
        //[TestCase("2-nmi_and_brk.nes", "")] //
        //[TestCase("3-nmi_and_irq.nes", "")]
        //[TestCase("4-irq_and_dma.nes", "")]
        //[TestCase("5-branch_delays_irq.nes", "")]
        public void CPU_Interrupts_No_Errors(string fileName, string expectedString)
        {
            var output = Utilties.RunTest(fileName, "cpu_int_v2");

            Assert.AreEqual(expectedString, output);
        }
예제 #6
0
        //[TestCase("03-dummy_reads.nes", "\n02-branch_wrap\n\nPassed\n\0")]
        public void CPU_Instruction_Misc_No_Errors(string fileName, string expectedString)
        {
            var output = Utilties.RunTest(fileName, "instr_misc");

            Assert.AreEqual(expectedString, output);
        }
예제 #7
0
        public void VBlank_NMI_Timing_Test_No_Errors(string fileName, string expectedString)
        {
            var output = Utilties.RunTest(fileName, "ppu_vbl_nmi");

            Assert.AreEqual(expectedString, output);
        }