This base class will get its methods called by the most-derived classes. The calls are injected by the EntryExitMethodDecorator Fody addin, so don't be surprised if you don't see any calls in the code.
Inheritance: IEntryExitDecorator
        public async Task <TestBaseClass> TestHierarchy(TestBaseClass b, TestDerived1Class d1, TestDerived11Class d11)
        {
            Console.WriteLine(b);
            Console.WriteLine(d1);
            Console.WriteLine(d11);



            return(null);
        }
        public void Test_GetValue_DottedAspect_NullMidResult() {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            Munger munger = new Munger("This.NullProperty.ToUpperInvariant");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            Assert.IsNull(value);
        }
Exemple #3
0
        public void Test_GetValue_DottedAspect_NullMidResult()
        {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            Munger        munger   = new Munger("This.NullProperty.ToUpperInvariant");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            Assert.IsNull(value);
        }
        public void Test_GetValue_VirtualPropertyOnBaseClass() {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            string testValue = "some test value";
            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("VirtualTestProperty");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            Assert.AreEqual(testValue, value);
        }
        public void Test_GetValue_DottedAspect_Success() {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            string testValue = "1234567890";
            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("This.VirtualTestProperty.ToUpperInvariant.Length");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            Assert.AreEqual(testValue.Length, value);
        }
Exemple #6
0
        public void Test_PutProperty_PropertyOnClass_Success()
        {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            string        newValue = "new-value";

            // Act
            bool result = Munger.PutProperty(instance, "NonVirtualTestProperty", newValue);

            // Assert
            Assert.True(result);
            Assert.AreEqual(newValue, instance.NonVirtualTestProperty);
        }
        public void Test_GetValue_DottedAspect_UnknownAspect() {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            string testValue = "1234567890";
            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("This.VirtualTestProperty.UnknownProperty.Length");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            string errorMsg = "'UnknownProperty' is not a parameter-less method, property or field of type 'System.String'";
            Assert.AreEqual(errorMsg, value);
        }
Exemple #8
0
        public void Test_GetValue_VirtualPropertyOnBaseClass()
        {
            // Arrange
            TestBaseClass instance  = new TestBaseClass();
            string        testValue = "some test value";

            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("VirtualTestProperty");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            Assert.AreEqual(testValue, value);
        }
Exemple #9
0
        public void Test_PutValue_DottedAspect_UnknownAspect()
        {
            // Arrange
            TestBaseClass instance  = new TestBaseClass();
            string        testValue = "1234567890";

            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("This.VirtualTestProperty.UnknownProperty");

            // Act
            munger.PutValue(instance, testValue);

            // Assert
            Assert.AreEqual(testValue, instance.VirtualTestProperty);
        }
Exemple #10
0
        public void Test_GetValue_DottedAspect_Success()
        {
            // Arrange
            TestBaseClass instance  = new TestBaseClass();
            string        testValue = "1234567890";

            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("This.VirtualTestProperty.ToUpperInvariant.Length");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            Assert.AreEqual(testValue.Length, value);
        }
Exemple #11
0
        public void Test_GetValue_DottedAspect_UnknownAspect()
        {
            // Arrange
            TestBaseClass instance  = new TestBaseClass();
            string        testValue = "1234567890";

            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("This.VirtualTestProperty.UnknownProperty.Length");

            // Act
            object value = munger.GetValue(instance);

            // Assert
            string errorMsg = "'UnknownProperty' is not a parameter-less method, property or field of type 'System.String'";

            Assert.AreEqual(errorMsg, value);
        }
Exemple #12
0
        public static void Main(string[] args)
        {
            //Console.ReadLine();

            try
            {
                Task.Run(async() =>
                {
                    using (var client = await TestBaseClass.GetTestClientAsync())
                    {
                        await GenerateClassFilesFromSchemaAsync(client, "Loans", "EncompassRest.Loans");
                    }
                }).Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            Console.Write("Press Enter to End.");
            Console.ReadLine();
        }
 public Task <TestBaseClass> TestHierarch2y(TestBaseClass b, TestDerived1Class d1, TestDerived11Class d11)
 {
     throw new NotImplementedException();
 }
        public void Test_PutProperty_PropertyOnClass_Success() {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            string newValue = "new-value";

            // Act
            bool result = Munger.PutProperty(instance, "NonVirtualTestProperty", newValue);

            // Assert
            Assert.True(result);
            Assert.AreEqual(newValue, instance.NonVirtualTestProperty);
        }
        public void Test_PutValue_DottedAspect_UnknownAspect() {
            // Arrange
            TestBaseClass instance = new TestBaseClass();
            string testValue = "1234567890";
            instance.VirtualTestProperty = testValue;
            Munger munger = new Munger("This.VirtualTestProperty.UnknownProperty");

            // Act
            munger.PutValue(instance, testValue);

            // Assert
            Assert.AreEqual(testValue, instance.VirtualTestProperty);
        }