Пример #1
0
        public void CreateFunctionWithParamsCreatesCorrectObject()
        {
            int    integerParam = 7;
            string textParam    = "TEST_STRING";
            ITestClassWithParams etalon_object  = new TestClassWithParams(integerParam, textParam);
            ITestClassWithParams created_object = classFactory.Create <ITestClassWithParams>(integerParam, textParam);

            Assert.ReferenceEquals(etalon_object, created_object);
        }
Пример #2
0
        public void CreateFunctionWithParams_Object_PropertyDeepCheck()
        {
            int    integerParam = 7;
            string textParam    = "TEST_STRING";
            ITestClassWithParams etalon_object  = new TestClassWithParams(integerParam, textParam);
            ITestClassWithParams created_object = classFactory.Create <ITestClassWithParams>(integerParam, textParam);

            Assert.AreEqual(etalon_object.integer, created_object.integer);
            Assert.AreEqual(etalon_object.text, created_object.text);
        }