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()); }
public void SetUp() { var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _translatableCommandBase = new TranslatableCommandBaseTestClass(translationUpdater); }