protected override void Context()
        {
            base.Context();

            _groupVolumeFraction = new Group {
                Name = "VolumeFraction"
            };
            var groupBloodFlow = new Group {
                Name = "BloodFlow"
            };
            var groupVolume = new Group {
                Name = "Volume"
            };

            _groupPhysiology = new Group {
                Name = "Physiology"
            };
            var groupAnatomy = new Group {
                Name = "Anatomy"
            };

            _groupPhysiology.AddChild(groupVolume);
            _groupPhysiology.AddChild(groupBloodFlow);
            A.CallTo(() => _groupRepository.GroupByName(_groupVolumeFraction.Name)).Returns(_groupVolumeFraction);
            A.CallTo(() => _groupRepository.GroupByName(_groupPhysiology.Name)).Returns(_groupPhysiology);
            A.CallTo(() => _groupRepository.GroupByName(groupAnatomy.Name)).Returns(groupAnatomy);
            A.CallTo(() => _groupRepository.GroupByName(groupBloodFlow.Name)).Returns(groupBloodFlow);
            A.CallTo(() => _groupRepository.GroupByName(groupVolume.Name)).Returns(groupVolume);
        }
        protected override void Context()
        {
            base.Context();
            var groupVolumeFraction = new Group {
                Name = "VolumeFraction"
            };
            var groupBloodFlow = new Group {
                Name = "BloodFlow"
            };
            var groupAnatomy = new Group {
                Name = "Anatomy"
            };

            _rootGroup = new Group {
                Name = "root"
            };
            _parameterInAnatomy = A.Fake <IParameter>();
            A.CallTo(() => _parameterInAnatomy.GroupName).Returns("Anatomy");

            A.CallTo(() => _groupRepository.GroupByName(_rootGroup.Name)).Returns(_rootGroup);
            A.CallTo(() => _groupRepository.GroupByName(groupAnatomy.Name)).Returns(groupAnatomy);
            A.CallTo(() => _groupRepository.GroupByName(groupBloodFlow.Name)).Returns(groupBloodFlow);
            A.CallTo(() => _groupRepository.GroupByName(groupVolumeFraction.Name)).Returns(groupVolumeFraction);
            _rootGroup.AddChild(groupVolumeFraction);
            _rootGroup.AddChild(groupBloodFlow);
            _allParameters.Add(_parameterInAnatomy);
        }
        public override void GlobalContext()
        {
            base.GlobalContext();
            _groupRepository = new GroupRepositoryForSpecs();
            _parentGroup     = new Group {
                Name = "Parent", Id = "1"
            };
            _childGroup = new Group {
                Name = "Child", Id = "2"
            };
            _otherGroup = new Group {
                Name = "Other", Id = "3"
            };
            _parentGroup.AddChild(_childGroup);
            _groupRepository.AddGroup(_parentGroup);
            _groupRepository.AddGroup(_childGroup);
            _groupRepository.AddGroup(_otherGroup);

            _tmpFile = FileHelper.GenerateTemporaryFileName();
            sut.Save(_groupRepository, _tmpFile);
            sut.Load(_groupRepository, _tmpFile);
        }