public async Task a_topic_summary_list_distincting_by_topic_showing_last_valid_version_name() { await InsertProductWithItsVersions(); var version3 = new ProductVersion("thirdVersion", "3.0", DateTime.Today); await InsertProductVersion(version3, ProductId); var topic = new TopicBuilder(ProductId, "AnyTopicId") .WithVersionRanges( new VersionRangeBuilder("FirstRange", version1, version2) .WithDocuments( spanishDocument.WithId("FirstDocument")), new VersionRangeBuilder("SecondRange", version3, version3) .WithDocuments( new Document("Any", "Any", "Any", "es-ES").WithId("ThirdDocument")) ).Build(); await sqlInserter.Insert(topic); var topicSummaries = await topicRepository.GetAllTopicsSummariesFor("es-ES"); topicSummaries.Should().Contain(t => t.VersionName == "3.0"); }
public async Task a_topic_summary_list() { await InsertProductWithItsVersions(); var topic = new TopicBuilder(ProductId, "AnyTopicId") .WithVersionRanges( new VersionRangeBuilder("AnyRangeId", version1, version1) .WithDocuments( new Document("Título", "Descripción", "Any", "es-ES").WithId("AnyDocumentId")) ).Build(); await sqlInserter.Insert(topic); var topicSummaries = await topicRepository.GetAllTopicsSummariesFor("es-ES"); topicSummaries.Should().Contain(t => t.TopicId == "AnyTopicId" && t.Product.ProductName == "Opportunity" && t.Product.ProductId == ProductId && t.VersionName == FirstVersionName && t.LastDocumentTitle == "Título" && t.LastDocumentDescription == "Descripción"); }