public void GetPropertyGroupSum_4筆一組_取Revenue總和Test() { //arrange var size = 4; var property = ProductProperty.Revenue; var stubDataDao = Substitute.For<IProductDataDao>(); stubDataDao.GetProducts().Returns(_products); var target = new ProductService(stubDataDao); var excepted = new int[] { 50, 66, 60 }; //act var actual = target.GetPropertyGroupSum(property, size); //assert excepted.ToExpectedObject().ShouldEqual(actual); }