Пример #1
0
        public void should_return_false_otherwise()
        {
            sut.AddBuildingBlock(A.Fake <IBuildingBlock>());
            sut.IsEmpty.ShouldBeFalse();

            sut = new MoBiProject();
            sut.AddSimulation(A.Fake <IMoBiSimulation>());
            sut.IsEmpty.ShouldBeFalse();
        }
Пример #2
0
        protected override void Context()
        {
            _projectRetriever = A.Fake <IMoBiProjectRetriever>();
            sut = new TagVisitor(_projectRetriever);

            _spatialStructure = new MoBiSpatialStructure();
            var topContainer = new Container().WithName("Top");

            topContainer.AddTag("Top");
            var sub1 = new Container().WithName("Sub1");

            sub1.AddTag("sub");
            var sub2 = new Container().WithName("Sub2");

            sub2.Add(new Parameter().WithName(AppConstants.Param));
            sub2.Add(new DistributedParameter().WithName("Param2"));
            sub2.AddTag("sub");
            topContainer.Add(sub1);
            topContainer.Add(sub2);

            var neighborHoods = new Container().WithName("N");

            neighborHoods.AddTag("N");
            _spatialStructure.NeighborhoodsContainer = neighborHoods;
            _spatialStructure.AddTopContainer(topContainer);

            var molecules = new Container().WithName(Constants.MOLECULE_PROPERTIES);

            molecules.AddTag(Constants.MOLECULE_PROPERTIES);
            _spatialStructure.GlobalMoleculeDependentProperties = molecules;

            var mobiProject = new MoBiProject();

            mobiProject.AddBuildingBlock(_spatialStructure);

            A.CallTo(() => _projectRetriever.Current).Returns(mobiProject);
        }
Пример #3
0
 protected override void Context()
 {
     sut = new MoBiProject();
 }