public void GetLocalizedContent_Given_Content_is_composite_and_number_of_pieces_and_entries_in_string_do_not_match_Should_return_main_content() { // Arrange staticContentRepository.Setup(m => m.Get(InvalidCompositeContent, It.IsAny <string>(), It.IsAny <string>())) .Returns(GetInvalidCompositeContent()); var localizedStaticContentService = new LocalizedStaticContentService(staticContentRepository.Object); // Act var actual = localizedStaticContentService.GetLocalizedContent(InvalidCompositeContent, It.IsAny <string>(), It.IsAny <string>()); // Assert Assert.Equal(InvalidCompositeContent, actual); }
public void GetLocalizedContent_Given_Content_is_not_composite_Should_merge_main_content_and_fragments_of_data() { // Arrange staticContentRepository.Setup(m => m.Get(RegularContentId, It.IsAny <string>(), It.IsAny <string>())) .Returns(GetRegularContent()); var localizedStaticContentService = new LocalizedStaticContentService(staticContentRepository.Object); // Act var actual = localizedStaticContentService.GetLocalizedContent(RegularContentId, It.IsAny <string>(), It.IsAny <string>()); // Assert Assert.Equal(RegularContent, actual); }