コード例 #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);
        }