Пример #1
0
        public async Task Verify_CreateFlightsAsync_Invoked()
        {
            // Arrange
            var fileManagerMock = new Mock <IFileManager <Flight> >();

            fileManagerMock.Setup(x => x.WriteToJsonAsync(It.IsAny <string>(), It.IsAny <List <Flight> >())).Verifiable();

            var sut = new FlightRepository(fileManagerMock.Object);
            // Act
            await sut.CreateFlightsAsync(new List <Flight>());

            // Assert
            Mock.Verify();
        }