コード例 #1
0
        public void ReflectionExtensionDisplayNameMatchesPropertyNameWhenAttributeMissing()
        {
            MockAccount account = new MockAccount()
            {
                AccountNumber = 1234567
            };

            Assert.AreEqual("Blah", account.DisplayName(p => p.Blah));
        }
コード例 #2
0
        public void ReflectionExtensionDisplayNameGetsAttributeValue()
        {
            MockAccount account = new MockAccount()
            {
                AccountNumber = 1234567
            };

            Assert.AreEqual("Account Number", account.DisplayName(p => p.AccountNumber));
        }
コード例 #3
0
        public void ReflectionExtensionDisplayNameMatchesPropertyNameWhenAttributeMissing()
        {
            MockAccount account = new MockAccount() { AccountNumber = 1234567 };

            Assert.AreEqual("Blah", account.DisplayName(p => p.Blah));
        }
コード例 #4
0
        public void ReflectionExtensionDisplayNameGetsAttributeValue()
        {
            MockAccount account = new MockAccount() { AccountNumber = 1234567 };

            Assert.AreEqual("Account Number", account.DisplayName(p => p.AccountNumber));
        }