コード例 #1
0
        public void testGetAllShowings()
        {
            dataSet = ShowingsClass.getAllShowings();

            string actualShowingDateRow0             = dataSet.Tables[0].Rows[0]["Date"].ToString();
            double actualShowingUpperCirclePriceRow0 = double.Parse(dataSet.Tables[0].Rows[0]["UpperCirclePrice"].ToString());
            double actualShowingDressCirclePriceRow0 = double.Parse(dataSet.Tables[0].Rows[0]["DressCirclePrice"].ToString());
            double actualShowingStallPriceRow0       = double.Parse(dataSet.Tables[0].Rows[0]["StallsPrice"].ToString());

            string actualShowingDateRow1             = dataSet.Tables[0].Rows[1]["Date"].ToString();
            double actualShowingUpperCirclePriceRow1 = double.Parse(dataSet.Tables[0].Rows[1]["UpperCirclePrice"].ToString());
            double actualShowingDressCirclePriceRow1 = double.Parse(dataSet.Tables[0].Rows[1]["DressCirclePrice"].ToString());
            double actualShowingStallPriceRow1       = double.Parse(dataSet.Tables[0].Rows[1]["StallsPrice"].ToString());

            string expectedShowingDateRow0             = "2017-06-24 17:00";
            double expectedShowingUpperCirclePriceRow0 = 50;
            double expectedShowingDressCirclePriceRow0 = 25;
            double expectedShowingStallPriceRow0       = 12.5;

            string expectedShowingDateRow1             = "2017-06-22 12:00";
            double expectedShowingUpperCirclePriceRow1 = 7;
            double expectedShowingDressCirclePriceRow1 = 2;
            double expectedShowingStallPriceRow1       = 1;

            Assert.AreEqual(expectedShowingDateRow0, actualShowingDateRow0);
            Assert.AreEqual(expectedShowingUpperCirclePriceRow0, actualShowingUpperCirclePriceRow0);
            Assert.AreEqual(expectedShowingDressCirclePriceRow0, actualShowingDressCirclePriceRow0);
            Assert.AreEqual(expectedShowingStallPriceRow0, actualShowingStallPriceRow0);

            Assert.AreEqual(expectedShowingDateRow1, actualShowingDateRow1);
            Assert.AreEqual(expectedShowingUpperCirclePriceRow1, actualShowingUpperCirclePriceRow1);
            Assert.AreEqual(expectedShowingDressCirclePriceRow1, actualShowingDressCirclePriceRow1);
            Assert.AreEqual(expectedShowingStallPriceRow1, actualShowingStallPriceRow1);
        }