Example #1
0
        public void DontGenerateTest()
        {
            IPreferenceSet prefs = CreatePreferenceSet();

            prefs.Stub(x => x.Get <bool>(Preference.WebGenCopyXml)).Return(false);
            prefs.Stub(x => x.Get <bool>(Preference.WebGenCopyHtml)).Return(false);

            var slots           = CreateSlotModelCollection();
            var markupGenerator = new MarkupGenerator(prefs);

            markupGenerator.Generate(slots);

            Assert.IsNull(markupGenerator.XmlFilePaths);
            Assert.IsNull(markupGenerator.HtmlFilePaths);
        }
Example #2
0
      public void Init()
      {
         _prefs = MockRepository.GenerateStub<IPreferenceSet>();
         _prefs.Stub(x => x.Get<PpdCalculationType>(Preference.PpdCalculation)).Return(PpdCalculationType.LastThreeFrames);
         _prefs.Stub(x => x.Get<BonusCalculationType>(Preference.CalculateBonus)).Return(BonusCalculationType.DownloadTime);
         _prefs.Stub(x => x.Get<bool>(Preference.ShowVersions)).Return(true);
         _prefs.Stub(x => x.Get<int>(Preference.DecimalPlaces)).Return(1);
         _prefs.Stub(x => x.Get<CompletedCountDisplayType>(Preference.CompletedCountDisplay)).Return(CompletedCountDisplayType.ClientRunTotal);
         _prefs.Stub(x => x.Get<bool>(Preference.EtaDate)).Return(false);
         _prefs.Stub(x => x.Get<string>(Preference.StanfordId)).Return("harlam357");
         _prefs.Stub(x => x.Get<int>(Preference.EtaDate)).Return(32);

         var container = new WindsorContainer();
         container.Register(
            Component.For<UnitInfoLogic>()
               .LifeStyle.Transient);
         ServiceLocator.SetContainer(container);
         container.Register(
            Component.For<IProteinBenchmarkCollection>()
               .ImplementedBy<ProteinBenchmarkCollection>());
         Core.Configuration.ObjectMapper.CreateMaps();
      }
Example #3
0
        public void Init()
        {
            _prefs = MockRepository.GenerateStub <IPreferenceSet>();
            _prefs.Stub(x => x.Get <PpdCalculationType>(Preference.PpdCalculation)).Return(PpdCalculationType.LastThreeFrames);
            _prefs.Stub(x => x.Get <BonusCalculationType>(Preference.CalculateBonus)).Return(BonusCalculationType.DownloadTime);
            _prefs.Stub(x => x.Get <bool>(Preference.ShowVersions)).Return(true);
            _prefs.Stub(x => x.Get <int>(Preference.DecimalPlaces)).Return(1);
            _prefs.Stub(x => x.Get <CompletedCountDisplayType>(Preference.CompletedCountDisplay)).Return(CompletedCountDisplayType.ClientRunTotal);
            _prefs.Stub(x => x.Get <bool>(Preference.EtaDate)).Return(false);
            _prefs.Stub(x => x.Get <string>(Preference.StanfordId)).Return("harlam357");
            _prefs.Stub(x => x.Get <int>(Preference.EtaDate)).Return(32);

            var container = new WindsorContainer();

            container.Register(
                Component.For <UnitInfoLogic>()
                .LifeStyle.Transient);
            ServiceLocator.SetContainer(container);
            container.Register(
                Component.For <IProteinBenchmarkCollection>()
                .ImplementedBy <ProteinBenchmarkCollection>());
            Core.Configuration.ObjectMapper.CreateMaps();
        }