Пример #1
0
        public void PairSwapIsPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Pair <string, int>, Pair <int, string> >(p => p.Swap());
            test.AssertPublicMethod <Pair <string, double>, Pair <double, string> >(p => p.Swap());
            test.Execute();
        }
Пример #2
0
        public void MyQueueDequeueTakesNothingAndReturnsNothing()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <MyQueue <int>, int>(q => q.Peek());
            test.AssertPublicMethod <MyQueue <double>, double>(q => q.Peek());
            test.Execute();
        }
Пример #3
0
        public void MyQueuePeekIsPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <MyQueue <int>, int>(q => q.Peek());
            test.AssertPublicMethod <MyQueue <double>, double>(q => q.Peek());
            test.Execute();
        }
Пример #4
0
        public void PairSetSndIsPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Pair <string, int>, double, Pair <string, double> >((p, d) => p.SetSnd(d));
            test.AssertPublicMethod <Pair <string, int>, long, Pair <string, long> >((p, d) => p.SetSnd(d));
            test.Execute();
        }
        public void RepositoryGetAllIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Repository <ICloneable>, List <ICloneable> >(r => r.GetAll());
            test.AssertPublicMethod <Repository <Dog>, List <Dog> >(r => r.GetAll());
            test.Execute();
        }
        public void RepositoryAddIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Repository <ICloneable>, ICloneable>((r, e) => r.Add(e));
            test.AssertPublicMethod <Repository <Dog>, Dog>((r, e) => r.Add(e));
            test.Execute();
        }
Пример #7
0
        public void CourseGetAverageStudentAgeIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Course, double>(c => c.GetAverageStudentAge());
            test.Execute();
        }
Пример #8
0
        public void CourseGetOldestStudentIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Course, Student>(c => c.GetOldestStudent());
            test.Execute();
        }
Пример #9
0
        public void CourseGetStudentByIDIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Course, int, Student>((c, i) => c.GetStudentByID(i));
            test.Execute();
        }
        public void ProductRepositoryGetProductCategoriesIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ProductRepository, IEnumerable <string> >(r => r.GetProductCategories());
            test.Execute();
        }
Пример #11
0
        public void ConsoleControllerAddCommand()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ConsoleController, string, Action <string> >((c, s, a) => c.AddCommand(s, a));
            test.Execute();
        }
Пример #12
0
        public void ConsoleViewRunIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ConsoleView>(v => v.Run());
            test.Execute();
        }
        public void PrintFamilyTakesPersonAsArgumentAndReturnsNothing()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <PersonPrinter, Person>((p1, p2) => p1.PrintFamily(p2));
            test.Execute();
        }
        public void GenerateFamilyReturnsPerson()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <PersonGenerator, Person>(g => g.GenerateFamily());
            test.Execute();
        }
Пример #15
0
        public void ConsoleViewRunIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ConsoleController, string>((c, s) => c.HandleInput(s));
            test.Execute();
        }
Пример #16
0
        public void ConsoleControllerRemoveCommand()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ConsoleController, string>((c, s) => c.RemoveCommand(s));
            test.Execute();
        }
Пример #17
0
        public void CourseDisenrollIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Course, Student>((c, s) => c.Disenroll(s));
            test.Execute();
        }
        public void ProductRepositoryGetProductByIDIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ProductRepository, int, Product>((r, i) => r.GetProductByID(i));
            test.Execute();
        }
Пример #19
0
        public void BankAccountAccrueOrChargeInterestIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <BankAccount>(b => b.AccrueOrChargeInterest());
            test.Execute();
        }
        public void ProductRepositoryGetAverageProductPriceIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ProductRepository, decimal>(r => r.GetAverageProductPrice());
            test.Execute();
        }
        public void ProductRepositoryDeleteIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ProductRepository, Product>((r, p) => r.Update(p));
            test.Execute();
        }
Пример #22
0
        public void DieConstructorTakesIRandomAndInt()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <CarSorter, Car[]>((c1, c2) => c1.Sort(c2));
            test.Execute();
        }
        public void ProductRepositoryGetMostExpensiveProductIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ProductRepository, Product>(r => r.GetMostExpensiveProduct());
            test.Execute();
        }
        public void MultiplyTakesImmutableAsArgumentAndReturnsNothing()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ImmutableNumber, ImmutableNumber, ImmutableNumber>((n1, n2) => n1.Multiply(n2));
            test.Execute();
        }
        public void ProductRepositoryGetProductsInCategoryIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ProductRepository, string, IEnumerable <Product> >((r, s) => r.GetProductsInCategory(s));
            test.Execute();
        }
        public void SubtractTakesImmutableNumberAsArgumentAndReturnsImmutableNumber()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <ImmutableNumber, ImmutableNumber, ImmutableNumber>((n1, n2) => n1.Subtract(n2));
            test.Execute();
        }
Пример #27
0
        public void LoggerLogIsAPublicMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <Logger, string>((l, s) => l.Log(s));
            test.Execute();
        }
Пример #28
0
        public void BankAccountWithdrawIsAPublicMehtod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicMethod <BankAccount, decimal>((b, d) => b.Withdraw(d));
            test.Execute();
        }