示例#1
0
        public void CreatesForms()
        {
            var formTypeProvider = Mock.Of <IFormTypeProvider>();

            Mock.Get(formTypeProvider).Setup(p => p.GetTypes()).Returns(new List <Type> {
                typeof(MyForm)
            });

            var result = new FormCreator(Mock.Of <IFormFieldCreator>(), formTypeProvider).Create();

            Assert.Single(result);
            Assert.Equal("lorem-ipsum", result.Single().Id);
        }