public void StubConfigViewmodels(Type type) { var viewmodels = new List <Type>(); viewmodels.Add(type); config.Stub(x => x.ViewModels).Return(viewmodels); }
public void Setup() { blockType = MockRepository.GenerateStub <Type>(); blockType.Stub(x => x.Name).Return("vmBlock_Test"); subBlockType = MockRepository.GenerateStub <Type>(); subBlockType.Stub(x => x.Name).Return("vmSub_Test"); subListBlockType = MockRepository.GenerateStub <Type>(); subListBlockType.Stub(x => x.IsGenericType).Return(true); subListBlockType.Stub(x => x.GenericTypeArguments).Return(new Type[] { subBlockType }); parentBlockType = MockRepository.GenerateStub <Type>(); parentBlockType.Stub(x => x.Name).Return("vmSub_Parent"); subExternalBlockType = MockRepository.GenerateStub <Type>(); subExternalBlockType.Stub(x => x.Name).Return("vmBlock_External"); ViewModels = new List <Type>(); ViewModels.Add(blockType); config = MockRepository.GeneratePartialMock <YuzuConfiguration>(new object[] { new List <IUpdateableConfig>() }); config.Stub(x => x.ViewModels).Return(ViewModels); }