コード例 #1
0
        public void Number_Of_Northwind_Customers_Test(string city, int expected)
        {
            var instance = new Northwind_Code();
            var actual   = instance.NumberOfNorthwindCustomers(city);

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void TotalOfAllCustomerOrders_Test(string CustomerId, double expected)
        {
            var instance = new Northwind_Code();
            var actual   = instance.TotalOfAllCustomerOrders(CustomerId);

            Assert.AreEqual((decimal)expected, actual);
        }
コード例 #3
0
        public void TestNumberOfProductsContainingALetter(string letter, int expected)
        {
            // arrange (instance)
            var instance = new Northwind_Code();
            // act (method)
            var actual = instance.TestNumberOfProductsContainingALetter(letter);

            // assert
            Assert.AreEqual(expected, actual);
        }
コード例 #4
0
        public void TestNumberOfProductsStartingWithP(int expected)
        {
            // arrange (instance)
            var instance = new Northwind_Code();
            // act (method)
            var actual = instance.TestNumberOfProductsStartingWithP();

            // assert
            Assert.AreEqual(expected, actual);
        }
コード例 #5
0
        [TestCase("Berlin", 1)] // how many in berlin
        public void TestNumberOfNorthwindCustomers(string city, int expected)
        {
            // arrange
            var instance = new Northwind_Code();
            // act
            var actual = instance.NumberOfNorthwindCustomers(city);

            // assert
            Assert.AreEqual(expected, actual);
        }