示例#1
0
        public void Test7NumberOfOrderIDWithTheSameDate(string date, int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.NumberOfOrderIDWithTheSameDate(date);

            Assert.AreEqual(actual, expected);
        }
示例#2
0
        public void Test3NumeberOfOrdersBySpecifiedCountry(string x, int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.NumeberOfOrdersBySpecifiedCountry(x);

            Assert.AreEqual(actual, expected);
        }
示例#3
0
        public void Test1EmployeesWithMostCustomer(int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.EmployeesWithMostCustomer();

            Assert.AreEqual(actual, expected);
        }
示例#4
0
        public void Test6NumberOfCustomerIDsWithTheSameShipName(string shipname, int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.NumberOfCustomerIDsWithTheSameShipName(shipname);

            Assert.AreEqual(expected, actual);
        }
示例#5
0
        public void Test5EmployeeWithMostOrders(int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.EmployeeWithMostOrders();

            Assert.AreEqual(expected, actual);
        }
示例#6
0
        public void Test4NumberOfOrdersWithNoShipRegion(int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.NumberOfOrdersWithNoShipRegion();

            Assert.AreEqual(expected, actual);
        }
示例#7
0
        public void Test2FreightAmountGreaterThan100(int expected)
        {
            var instance = new CodeToTest();
            var actual   = instance.FreightAmountGreaterThan100();

            Assert.AreEqual(actual, expected);
        }
示例#8
0
        public void ProductsBeginWithChar(char letter, int expected)
        {
            var instance01 = new CodeToTest();

            var actual = instance01.ProductsBeginWith(letter);

            Assert.AreEqual(expected, actual);
        }
示例#9
0
        public void ProductsStock(int stockGreaterThan, int expected)
        {
            var instance01 = new CodeToTest();

            var actual = instance01.WithStockGreaterThan(stockGreaterThan);

            Assert.AreEqual(expected, actual);
        }
示例#10
0
        public void ProductsStoredIn(string container, int expected)
        {
            var instance01 = new CodeToTest();

            var actual = instance01.ProductsStoredIn(container);

            Assert.AreEqual(expected, actual);
        }
示例#11
0
        public void Test1MexicoOwners(string country, string contactTitle, int expected)
        {
            var instance = new CodeToTest();

            var actual = instance.ContactTitleInCountry(country, contactTitle);

            Assert.AreEqual(expected, actual);
        }
示例#12
0
        public void DiscontinuedCountTest(bool IsDiscontinued, int expected)
        {
            var instance01 = new CodeToTest();

            var actual = instance01.DiscontinuedCount(IsDiscontinued);

            Assert.AreEqual(expected, actual);
        }
示例#13
0
        public void Test2Fax(int expected)
        {
            var instance = new CodeToTest();

            var actual = instance.HasCustomerGotFax();

            Assert.AreEqual(expected, actual);
        }
示例#14
0
        public void ProductsPerSupplier(int supplierId, int expected)
        {
            var instance01 = new CodeToTest();

            var actual = instance01.ProductsPerSupplier(supplierId);

            Assert.AreEqual(expected, actual);
        }
示例#15
0
        public void Test6PostCodeArea(string country, int expected)
        {
            var instance = new CodeToTest();

            var actual = instance.CustomersInPostCodeArea(country);

            Assert.AreEqual(expected, actual);
        }
示例#16
0
        public void Test5FreightOver100(double freight, int expected)
        {
            var instance = new CodeToTest();

            var actual = instance.FreightOver100(freight);

            Assert.AreEqual(expected, actual);
        }
示例#17
0
        public void Test4GivenCountry(string country, int expected)
        {
            var instance = new CodeToTest();

            var actual = instance.CustomersInGivenCountry(country);

            Assert.AreEqual(expected, actual);
        }
示例#18
0
        public void UnitPriceDesc(string order, decimal expected)
        {
            var instance01 = new CodeToTest();

            var actual = instance01.UnitPriceDesc(order);

            //Console.WriteLine(actual);
            Assert.AreEqual(expected, actual);
        }
示例#19
0
        public void Test4CustomerWithMostOrders(string expected)
        {
            var instance = new CodeToTest();

            var actual = instance.TopOrdersFromCustomers();


            Assert.AreEqual(expected, actual);
        }
    public void TestMethod1()
    {
        const int length = 10;
        var       j      = 0;
        List <Dictionary <string, object> > theList = new List <Dictionary <string, object> >();

        for (int i = length - 1; i >= 0; i--)
        {
            var theDictionary = new Dictionary <string, object>();
            theDictionary.Add("string-" + i + "-" + j++, new object());
            theDictionary.Add("string-" + i + "-" + j++, new object());
            theDictionary.Add("string-" + i + "-" + j++, new object());
            theDictionary.Add("string-" + i + "-" + j++, new object());
            theList.Add(theDictionary);
        }
        var theTested     = new CodeToTest(theList);
        var returnedValue = theTested.TestThis();

        Assert.AreEqual(returnedValue, length);
    }