コード例 #1
0
        public void Initialize_UpdateOrCreateTranslationViaTranslationFactoryOfTranslationUpdater()
        {
            var translation = new TranslatableCommandBaseTestTranslation();

            _translationFactory = Substitute.For <ITranslationFactory>();
            _translationFactory.UpdateOrCreateTranslation(Arg.Any <TranslatableCommandBaseTestTranslation>()).Returns(translation);
            var translationUpdater = new TranslationUpdater(_translationFactory, new ThreadManager());

            _translatableCommandBase = new TranslatableCommandBaseTestClass(translationUpdater);

            Assert.AreSame(translation, _translatableCommandBase.GetTranslation());
        }
コード例 #2
0
        public void SetUp()
        {
            var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager());

            _translatableCommandBase = new TranslatableCommandBaseTestClass(translationUpdater);
        }