コード例 #1
0
ファイル: ProductTest.cs プロジェクト: vivifong/Day1homework
        public void TestMethodProductCount_number_4_field_Revenue()
        {
            //arange
            var DataIn    = new DoIData();
            var target    = new Product(DataIn);
            var number    = 4;
            var fieldName = "Revenue";
            var expected  = new int[] { 50, 66, 60, };

            //act
            //IEnumerable<int> actual = target.GetResultSet(number, fieldName);
            var actual = target.ProductCount(number, fieldName).ToArray();

            //assert
            expected.ToExpectedObject().ShouldEqual(actual);
        }
コード例 #2
0
ファイル: ProductTest.cs プロジェクト: vivifong/Day1homework
        public void TestMethodProductCount_number_3_field_Cost()
        {
            //arange
            var DataIn    = new DoIData();
            var target    = new Product(DataIn);
            var number    = 3;
            var fieldName = "Cost";
            var expected  = new int[] { 6, 15, 24, 21 };

            //act
            //IEnumerable<int> actual = target.GetResultSet(number, fieldName);
            var actual = target.ProductCount(number, fieldName).ToArray();

            //assert
            expected.ToExpectedObject().ShouldEqual(actual);
        }