public void TestTryGetNotExistingParkWifi()
        {
            var useCase    = new GetParkWifiListUseCase(CreateParkWifiRepository());
            var outputPort = new OutputPort();

            Assert.True(useCase.Handle(GetParkWifiListUseCaseRequest.CreateParkWifiRequest(999), outputPort).Result);
            Assert.Empty(outputPort.ParkWifis);
        }
        public void TestGetAllParkWifisFromEmptyRepository()
        {
            var useCase    = new GetParkWifiListUseCase(new InMemoryParkWifiRepository());
            var outputPort = new OutputPort();

            Assert.True(useCase.Handle(GetParkWifiListUseCaseRequest.CreateAllParkWifisRequest(), outputPort).Result);
            Assert.Empty(outputPort.ParkWifis);
        }
        public void TestGetParkWifi()
        {
            var useCase    = new GetParkWifiListUseCase(CreateParkWifiRepository());
            var outputPort = new OutputPort();

            Assert.True(useCase.Handle(GetParkWifiListUseCaseRequest.CreateParkWifiRequest(2), outputPort).Result);
            Assert.Single(outputPort.ParkWifis, pn => 2 == pn.Id);
        }
        public void TestGetAllParkWifi()
        {
            var useCase    = new GetParkWifiListUseCase(CreateParkWifiRepository());
            var outputPort = new OutputPort();

            Assert.True(useCase.Handle(GetParkWifiListUseCaseRequest.CreateAllParkWifisRequest(), outputPort).Result);
            Assert.Equal <int>(4, outputPort.ParkWifis.Count());
            Assert.Equal(new long[] { 1, 2, 3, 4 }, outputPort.ParkWifis.Select(mp => mp.Id));
        }