public async Task Updates_Document_On_Existing_Item() { var apiDescriptions = new[] { new ServiceApiDescription() { ServiceId = "Test1" }, new ServiceApiDescription() { ServiceId = "Test2" }, new ServiceApiDescription() { ServiceId = "Test3" }, }; var store = new InMemoryApiStore(apiDescriptions); await store.StoreAsync(new ServiceApiDescription() { ServiceId = "Test2", ApiDocument = new Microsoft.OpenApi.Models.OpenApiDocument() }); var service = await store.FindByServiceIdAsync("Test2"); service.Should().NotBeNull(); service.ApiDocument.Should().NotBeNull(); }
public async Task Returns_Existing_Api() { var apiDescriptions = new[] { new ServiceApiDescription() { ServiceId = "Test1" }, new ServiceApiDescription() { ServiceId = "Test2" } }; var store = new InMemoryApiStore(apiDescriptions); var item = await store.FindByServiceIdAsync("Test2"); item.Should().NotBeNull(); item.ServiceId.Should().Be("Test2"); item = await store.FindByServiceIdAsync("Test1"); item.Should().NotBeNull(); item.ServiceId.Should().Be("Test1"); }