/// <summary> /// Build a mockup for a translation. /// </summary> /// <param name="cultureName">Name for the culture which are used for translation.</param> /// <param name="translationOfIdentifier">Identifier for the domain object which are translated by the translation.</param> /// <returns>Mockup for a translation.</returns> public static ITranslation BuildTranslationMock(string cultureName, Guid translationOfIdentifier) { ITranslation translationMock = MockRepository.GenerateMock <ITranslation>(); translationMock.Stub(m => m.Identifier) .Return(Guid.NewGuid()) .Repeat.Any(); translationMock.Stub(m => m.TranslationOfIdentifier) .Return(translationOfIdentifier) .Repeat.Any(); translationMock.Stub(m => m.TranslationInfo) .Return(BuildTranslationInfoMock(cultureName)) .Repeat.Any(); translationMock.Stub(m => m.Value) .Return(Fixture.Create <string>()) .Repeat.Any(); return(translationMock); }