Beispiel #1
0
 [TestMethod] public void RoundingStepTest()
 {
     isReadOnlyProperty(obj, GetMember.Name <RoundingPolicy>(x => x.RoundingStep), (double)0);
 }
Beispiel #2
0
 [TestMethod] public void RoundingDigitTest()
 {
     isReadOnlyProperty(obj, GetMember.Name <RoundingPolicy>(x => x.RoundingDigit), (byte)5);
 }
Beispiel #3
0
 public static ExcelRowClassMapper Create <T>(Expression <Func <T, object> > name, object value, ExcelRowClassMapperType valueType) => new ExcelRowClassMapper(GetMember.Name <T>(name), value, valueType);
Beispiel #4
0
 [TestMethod] public void NumberOfDigitsTest()
 {
     isReadOnlyProperty(obj, GetMember.Name <RoundingPolicy>(x => x.NumberOfDigits), (sbyte)2);
 }
Beispiel #5
0
        public void DataIsReadOnlyTest()
        {
            var name = GetMember.Name <Account>(x => x.Data);

            Assert.IsTrue(IsReadOnly.Field <Account>(name));
        }
Beispiel #6
0
 public IHtmlContent LabelFor <TResult>(Expression <Func <TModel, TResult> > e,
                                        string labelText, object htmlAttributes) => new HtmlContentMock($"LabelFor{GetMember.Name(e)}");
 public IHtmlContent EditorFor <TResult>(Expression <Func <T, TResult> > expression, string templateName, string htmlFieldName,
                                         object additionalViewData) => new HtmlString($"EditorFor {GetMember.Name(expression)} {additionalViewData}");
 [TestMethod] public void NameTestFunction()
 => Assert.AreEqual("ToString",
                    GetMember.Name <object>(x => x.ToString()));
 public string DisplayNameFor <TResult>(Expression <Func <T, TResult> > expression)
 => GetMember.Name(expression);
 public IHtmlContent DropDownListFor <TResult>(Expression <Func <T, TResult> > expression, IEnumerable <SelectListItem> selectList,
                                               string optionLabel, object htmlAttributes) => new HtmlString($"DropDownListFor {GetMember.Name(expression)} {htmlAttributes}");
Beispiel #11
0
 [TestMethod] public void UnitTest() =>
 isReadOnlyProperty(obj, GetMember.Name <Abc.Domain.Quantity.Quantity>(x => x.Unit), null);
Beispiel #12
0
 [TestMethod] public void AmountTest() =>
 isReadOnlyProperty(obj, GetMember.Name <Abc.Domain.Quantity.Quantity>(x => x.Amount), 0.0);
Beispiel #13
0
 public void DescendingStringTest()
 {
     var propertyName = GetMember.Name <testClass>(x => x.DescendingString);
 }
 [TestMethod] public void NameTestField()
 => Assert.AreEqual("StringField",
                    GetMember.Name <GetMemberTests>(x => x.StringField));
 public IHtmlContent LabelFor <TResult>(Expression <Func <T, TResult> > expression, string labelText, object htmlAttributes)
 => new HtmlString($"LabelFor {GetMember.Name(expression)} {htmlAttributes}");
 [TestMethod] public void NameTestProperty()
 => Assert.AreEqual("StringProperty",
                    GetMember.Name <GetMemberTests>(x => x.StringProperty));
 public IHtmlContent ValidationMessageFor <TResult>(Expression <Func <T, TResult> > expression, string message,
                                                    object htmlAttributes, string tag) => new HtmlString($"ValidationMessageFor {GetMember.Name(expression)} {htmlAttributes}");
 [TestMethod] public void NameTestMethod()
 => Assert.AreEqual("NameTestMethod",
                    GetMember.Name <GetMemberTests>(x => x.NameTestMethod()));
 public string ValueFor <TResult>(Expression <Func <T, TResult> > e, string format) => GetMember.Name(e);
        public void DescendingStringTest()
        {
            var propertyName = GetMember.Name <testClass>(x => x.DescendingString);

            isReadOnlyProperty(obj, propertyName, "_desc");
        }
Beispiel #21
0
 [TestMethod] public void RoundingStrategyTest()
 {
     isReadOnlyProperty(obj, GetMember.Name <RoundingPolicy>(x => x.RoundingStrategy), RoundingStrategy.Round);
 }
Beispiel #22
0
        public void DbRecordIsReadOnlyTest()
        {
            var name = GetMember.Name <CountryObject>(x => x.DbRecord);

            Assert.IsTrue(IsReadOnly.Field <CountryObject>(name));
        }
Beispiel #23
0
        [TestMethod] public void DbRecordIsReadOnlyTest()
        {
            var name = GetMember.Name <BidObject>(x => x.DbRecord);

            Assert.IsTrue(IsReadOnly.Field <BidObject>(name));
        }