Exemplo n.º 1
0
        public void Should_Populate_Fields_Of_SubClass()
        {
            //Create a new instance of our test class
            var testInstance = new ComplexPrivatePocoTestClass();

            //Match the fields...
            _matcher.Match(testInstance);

            /* ASSERTIONS */

            //Assert that all of the fields on the main class have been injected and instantiated
            Assert.AreNotEqual(testInstance.Double1, default(double));
            Assert.AreNotEqual(testInstance.Float1, default(float));
            Assert.AreNotEqual(testInstance.Float2, default(float));
            Assert.AreNotEqual(testInstance.Long1, default(long));
            Assert.AreNotEqual(testInstance.Guid1, default(Guid));
            Assert.IsNotNullOrEmpty(testInstance.SampleString);
        }
        public void Should_Populate_Fields_Of_SubClass()
        {
            //Create a new instance of our test class
            var testInstance = new ComplexPrivatePocoTestClass();

            //Match the fields...
            _matcher.Match(testInstance);

            /* ASSERTIONS */

            //Assert that all of the fields on the main class have been injected and instantiated
            Assert.AreNotEqual(testInstance.Double1, default(double));
            Assert.AreNotEqual(testInstance.Float1, default(float));
            Assert.AreNotEqual(testInstance.Float2, default(float));
            Assert.AreNotEqual(testInstance.Long1, default(long));
            Assert.AreNotEqual(testInstance.Guid1, default(Guid));
            Assert.IsNotNullOrEmpty(testInstance.SampleString);
        }