Example #1
0
        public void PairHasCorrectConstructor()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <string, int, Pair <string, int> >((v1, v2) => new Pair <string, int>(v1, v2));
            test.AssertPublicConstructor <string, double, Pair <string, double> >((v1, v2) => new Pair <string, double>(v1, v2));
            test.Execute();
        }
Example #2
0
        public void RepositoryHasPublicDefaultConstructorThatTakesILogger()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <ILogger, Repository <ICloneable> >(l => new Repository <ICloneable>(l));
            test.Execute();
        }
Example #3
0
        public void TextFileConstructorTakesString()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <string, TextFile>(s => new TextFile(s));
            test.Execute();
        }
        public void DieConstructorTakesIRandomAndInt()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <string, ILogger>(s => new FileLogger(s));
            test.Execute();
        }
        public void ImmutableNumberConstructorTakesIntAsArgument()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <int, ImmutableNumber>(i => new ImmutableNumber(i));
            test.Execute();
        }
Example #6
0
        public void MyQueueHasConstructorWhichTakesInt()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <int, MyQueue <string> >(i => new MyQueue <string>(i));
            test.Execute();
        }
Example #7
0
        public void EmployeeConstructorTakesStringAsArgument()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <string, Employee>(name => new Employee(name));
            test.Execute();
        }
Example #8
0
        public void DogHasPublicDefaultConstructor()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <Dog>(() => new Dog());
            test.Execute();
        }
        public void DieConstructorTakesIRandomAndInt()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <IRandom, int, Die>((r, s) => new Die(r, s));
            test.Execute();
        }
        public void RepositoryHasPublicDefaultConstructor()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertPublicConstructor <Repository <ICloneable> >(() => new Repository <ICloneable>());
            test.Execute();
        }