Пример #1
0
        public void ShiftToEndForTest()
        {
            var builder = new GenericUserInterfaceModelBuilder <SomeClass>(TestsHelper.CreateDefaultBag());

            builder.ShiftToEndFor(x => x.Property2);

            Assert.IsTrue(builder.Result.Interface.Blocks.Last().PropertyName == nameof(SomeClass.Property2));
        }
Пример #2
0
        public async Task TestOnGeneric()
        {
            var bag = TestsHelper.CreateDefaultBag();

            var model = await bag.GetDefaultInterface(typeof(ClientSearch).FullName);

            Assert.IsNotNull(model != null);
        }
Пример #3
0
        public void ShiftToStartForTest()
        {
            var builder = new GenericUserInterfaceModelBuilder <SomeClass>(TestsHelper.CreateDefaultBag());

            builder.ShiftToStartFor(x => x.Property);

            var result = builder.Result;

            Assert.IsTrue(result.Interface.Blocks.First().PropertyName == nameof(SomeClass.Property));
        }
Пример #4
0
        public void TestListOfStringPoperty()
        {
            var result = new GenericUserInterfaceModelBuilder <SomeClass>(TestsHelper.CreateDefaultBag()).Result;

            var block = result.Interface.Blocks.First(t => t.PropertyName == nameof(SomeClass.Property2));

            Assert.AreEqual(nameof(SomeClass.Property2), block.LabelText);
            Assert.AreEqual(UserInterfaceType.MultipleDropDownList, block.InterfaceType);
            Assert.IsTrue(block.DropDownData.SelectList.Count == 0);
        }