Пример #1
0
        public void TestMethod1()
        {
            Kata kata   = new Kata();
            var  result = new List <string> {
            };

            CollectionAssert.AreEqual(result, kata.Wave(""), "it should return '" + result + "'");
        }
        public void IsCollectionContainsEl(int elem)
        {
            var list1 = new List <int>()
            {
                1, 2, 3, 4
            };

            CollectionAssert.Contains(list1, elem);
        }
Пример #3
0
        public void BasicTest1()
        {
            Kata          kata   = new Kata();
            List <string> result = new List <string> {
                "Hello", "hEllo", "heLlo", "helLo", "hellO"
            };

            CollectionAssert.AreEqual(result, kata.Wave("hello"), "it should return '" + result + "'");
        }
Пример #4
0
        public void TestMethod5()
        {
            Kata          kata   = new Kata();
            List <string> result = new List <string> {
                "$He", "$hE"
            };

            CollectionAssert.AreEqual(result, kata.Wave("$he"), "it should return '" + result + "'");
        }
        public async Task Get5TopProductsAsync_ValidData_SuccessResult(Top5ProductsDataSet input)
        {
            var productService = PrepareSuccessCaseService(input.Products, input.Orders);

            var(status, topProducts) = await productService.Get5TopProductsAsync();

            Assert.AreEqual(ResultStatus.Success, status);
            var result = topProducts.Select(p => (p.Product.MerchantProductNo, p.TotalQuantity)).ToList();

            CollectionAssert.AreEquivalent(input.Result.ToList(), result);
        }
        public void IsCollectionsEqual()
        {
            var list1 = new List <int>()
            {
                1, 2, 3, 4
            };
            var list2 = new List <int>()
            {
                1, 2, 3, 4
            };

            CollectionAssert.AreEqual(list1, list2);
        }