[TestMethod] public void CurrenciesTest()
        {
            var p = GetClass.Property <MoneyCalculatorView>(
                GetMember.Name <MoneyCalculatorView>(x => x.Currencies));

            Assert.IsFalse(p.CanWrite);
            Assert.IsTrue(p.CanRead);
        }
Beispiel #2
0
        public void PropertyTest()
        {
            var a = GetClass.Property <classTest>("F");

            Assert.IsNotNull(a);
            Assert.IsInstanceOfType(a, typeof(PropertyInfo));
            Assert.AreEqual("F", a.Name);
        }
        [TestMethod] public void PropertyTest()
        {
            void test(string name)
            {
                Assert.AreEqual(name, GetClass.Property <CountryViewModel>(name).Name);
            }

            Assert.IsNull(GetClass.Property <CountryViewModel>(null));
            Assert.IsNull(GetClass.Property <CountryViewModel>(String.Empty));
            Assert.IsNull(GetClass.Property <CountryViewModel>("bla bla"));
            test(GetMember.Name <CountryViewModel>(m => m.Alpha3Code));
            test(GetMember.Name <CountryViewModel>(m => m.Alpha2Code));
            test(GetMember.Name <CountryViewModel>(m => m.Name));
            test(GetMember.Name <CountryViewModel>(m => m.ValidFrom));
            test(GetMember.Name <CountryViewModel>(m => m.ValidTo));
        }
Beispiel #4
0
        public void PropertyTest()
        {
            void test(string name)
            {
                Assert.AreEqual(name, GetClass.Property <ProfileViewModel>(name).Name);
            }

            Assert.IsNull(GetClass.Property <ProfileViewModel>(null));
            Assert.IsNull(GetClass.Property <ProfileViewModel>(String.Empty));
            Assert.IsNull(GetClass.Property <ProfileViewModel>("bla bla"));
            test(GetMember.Name <ProfileViewModel>(m => m.ID));
            test(GetMember.Name <ProfileViewModel>(m => m.Name));
            test(GetMember.Name <ProfileViewModel>(m => m.Location));
            test(GetMember.Name <ProfileViewModel>(m => m.BirthDay));
            test(GetMember.Name <ProfileViewModel>(m => m.Gender));
        }
Beispiel #5
0
        [TestMethod] public void PropertyTest()
        {
            void test(string name)
            {
                Assert.AreEqual(name, GetClass.Property <BidViewModel>(name).Name);
            }

            Assert.IsNull(GetClass.Property <BidViewModel>(null));
            Assert.IsNull(GetClass.Property <BidViewModel>(String.Empty));
            Assert.IsNull(GetClass.Property <BidViewModel>("bla bla"));
            test(GetMember.Name <BidViewModel>(m => m.ID));
            test(GetMember.Name <BidViewModel>(m => m.ProductId));
            test(GetMember.Name <BidViewModel>(m => m.UserId));
            test(GetMember.Name <BidViewModel>(m => m.Price));
            test(GetMember.Name <BidViewModel>(m => m.ValidFrom));
            test(GetMember.Name <BidViewModel>(m => m.ValidTo));
        }
Beispiel #6
0
        [TestMethod] public void PropertyTest()
        {
            void test(string name)
            {
                Assert.AreEqual(name, GetClass.Property <AccountView>(name).Name);
            }

            Assert.IsNull(GetClass.Property <AccountView>(null));
            Assert.IsNull(GetClass.Property <AccountView>(String.Empty));
            Assert.IsNull(GetClass.Property <AccountView>("bla bla"));
            test(GetMember.Name <AccountView>(m => m.Balance));
            test(GetMember.Name <AccountView>(m => m.AspNetUserId));
            test(GetMember.Name <AccountView>(m => m.Status));
            test(GetMember.Name <AccountView>(m => m.Type));
            test(GetMember.Name <AccountView>(m => m.ValidFrom));
            test(GetMember.Name <AccountView>(m => m.ValidTo));
        }
Beispiel #7
0
 static void Test(string name)
 => Assert.AreEqual(name, GetClass.Property <CoachView>(name).Name);