Ejemplo n.º 1
0
        public async Task ReportUnknownPlate_ShouldReturnPlateReportWithNotEmptyId()
        {
            var vehicleToReport = CreateValidVehicleReport();
            var result          = await ReportVehicleUseCase.Report(vehicleToReport);

            result.VehicleReportId.Should().NotBeEmpty();
        }
Ejemplo n.º 2
0
        public async Task ReportUnknownPlate_ShouldReturnTypeOfPlateReport()
        {
            var vehicleToReport = CreateValidVehicleReport();
            var result          = await ReportVehicleUseCase.Report(vehicleToReport);

            result.Should().BeOfType <VehicleReport>();
        }
Ejemplo n.º 3
0
        public async Task ReportUnknownPlate_ShouldNotReturnNull()
        {
            var vehicleToReport = CreateValidVehicleReport();
            var result          = await ReportVehicleUseCase.Report(vehicleToReport);

            result.Should().NotBeNull();
        }
Ejemplo n.º 4
0
        public void ReportWithEmptyUserId_ShouldThrowException()
        {
            var vehicleToReport = CreateValidVehicleReport();

            vehicleToReport.UserId = Guid.Empty;
            Func <Task <VehicleReport> > action = async() => await ReportVehicleUseCase.Report(vehicleToReport);

            action.Should().Throw <AppArgumentException>();
        }
Ejemplo n.º 5
0
        public void ReportWithNullCommunityId_ShouldThrowException()
        {
            var vehicleToReport = CreateValidVehicleReport();

            vehicleToReport.CommunityId = null;
            Func <Task <VehicleReport> > action = async() => await ReportVehicleUseCase.Report(vehicleToReport);

            action.Should().Throw <AppArgumentException>();
        }
Ejemplo n.º 6
0
        public void ReportEmptyPlate_ShouldThrowException()
        {
            var vehicleToReport = CreateValidVehicleReport();

            vehicleToReport.Plate = string.Empty;
            Func <Task <VehicleReport> > action = async() => await ReportVehicleUseCase.Report(vehicleToReport);

            action.Should().Throw <AppArgumentException>();
        }
Ejemplo n.º 7
0
        public void ReportNullPlateRequest_ShouldThrowException()
        {
            Func <Task <VehicleReport> > action = async() => await ReportVehicleUseCase.Report(null);

            action.Should().Throw <AppArgumentException>();
        }