public static void ClassInitialise(TestContext context) { IoC.MapHardcodedRegistrations(); mockFilter = MockRepository.GenerateMock<ITrivialFilter>(); var modelContainer = new Container(); mockFilter.Expect(m => m.HideTrivialTypes).Return(true).Repeat.Any(); mockFilter.Expect(m => m.IsTrivialType(typeof(String).FullName)).Return(true).Repeat.Any(); mockFilter.Expect(m => m.IsTrivialType(typeof(Delegate).FullName)).Return(true).Repeat.Any(); subject = VisualisableTypeTestData.FullModel<Car>(modelContainer, mockFilter); }
public static void ClassInitialise(TestContext context) { GlobalIntermediateLanguageConstants.LoadOpCodes(); IoC.MapHardcodedRegistrations(); mockTrivialFilter = MockRepository.GenerateMock<ITrivialFilter>(); mockTrivialFilter.Expect(m => m.HideTrivialTypes).Return(true).Repeat.Any(); mockTrivialFilter.Expect(m => m.IsTrivialType(typeof(Delegate).FullName)).Return(true).Repeat.Any(); mockTrivialFilter.Expect(m => m.IsTrivialType(typeof(bool).FullName)).Return(true).Repeat.Any(); mockTrivialFilter.Expect(m => m.IsTrivialType(typeof(Interlocked).FullName)).Return(true).Repeat.Any(); mockEmptyTrivialFilter = MockRepository.GenerateStub<ITrivialFilter>(); // By default filter is off modelContainer = new Container(c => c.For<ITrivialFilter>().Use(mockEmptyTrivialFilter)); subjectCar = VisualisableTypeTestData.FullModel<Car>(modelContainer); subjectFleet = VisualisableTypeTestData.FullModel<Fleet>(modelContainer); }
protected Association(IApplicationResources resources, ITrivialFilter trivialFilter) { this.ApplicationResources = resources; this.trivialFilter = trivialFilter; }
private IDiagramDimensions dimensions; // Need to set this in testing #endregion Fields #region Constructors /// <summary> /// Initializes a new instance of the <see cref="FieldAssociation"/> class. /// Only actual instances of <see cref="FieldAssociation"/> use this constructor. Sub-classes use the other. /// </summary> /// <param name="resources"> /// The application resources. /// </param> /// <param name="trivialFilter"> /// The trivial filter to use to determine the kind of relationship. Used for styling decisions. /// </param> /// <param name="modelBuilder"> /// The model Builder to be used when constructing the related <see cref="IVisualisableType"/> from the given type in <see cref="Initialise"/>. /// </param> /// <param name="diagramDimensions"> /// The diagram Dimensions. /// </param> public FieldAssociation(IApplicationResources resources, ITrivialFilter trivialFilter, IModelBuilder modelBuilder, IDiagramDimensions diagramDimensions) : base(resources, trivialFilter) { this.dimensions = diagramDimensions; this.modelBuilder = modelBuilder; }
public StaticAssociation(IApplicationResources resources, ITrivialFilter trivialFilter, IModelBuilder modelBuilder, IDiagramDimensions diagramDimensions) : base(resources, trivialFilter, modelBuilder, diagramDimensions) { }
public ViewportControllerFilter(ITrivialFilter trivialFilter) { this.SecondaryAssociationElements = new Dictionary<string, DiagramElement>(); this.trivialFilter = trivialFilter; }
public SubjectAssociation(IApplicationResources resources, ITrivialFilter trivialFilter) : base(resources, trivialFilter) { }
public TestAssociation(IApplicationResources stubApplicationResources, ITrivialFilter filter, VisualisableType associatedTo) : base(stubApplicationResources, filter) { AssociatedTo = associatedTo; }
public TestAssociation(VisualisableType associatedTo, ITrivialFilter filter) : base(null, filter) { AssociatedTo = associatedTo; }
public ParentAssociation(IApplicationResources resources, ITrivialFilter trivialFilter, IModelBuilder modelFactory) : base(resources, trivialFilter) { this.modelBuilder = modelFactory; }