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)); }
public async Task TestOnGeneric() { var bag = TestsHelper.CreateDefaultBag(); var model = await bag.GetDefaultInterface(typeof(ClientSearch).FullName); Assert.IsNotNull(model != null); }
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)); }
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); }