Exemplo n.º 1
0
        public void GetById_GivenNegativeId_ShouldThrowMegativeIntException()
        {
            // arrange
            int            id      = -1;
            IDrivesService service = new DrivesService(null, null, null);

            // act
            // assert
            service.Invoking(s => s.GetById(id))
            .Should().ThrowExactly <NegativeIntException>();
        }
Exemplo n.º 2
0
        public void GetDetailsAdminModel_GivenNegativeDriveId_ShouldThrowNegativeIntException()
        {
            // arrange
            int            driveId = -1;
            IDrivesService service = new DrivesService(null, null, null);

            // act
            // assert
            service.Invoking(s => s.GetDetailsAdminModel(driveId))
            .Should().ThrowExactly <NegativeIntException>();
        }
Exemplo n.º 3
0
        public void ReserveSeat_GivenNegativeUserId_ShouldThrowNegativeIntException()
        {
            // arrange
            int            driveId = 1;
            int            userId  = -1;
            IDrivesService service = new DrivesService(null, null, null);

            // act
            // assert
            service.Invoking(s => s.ReserveSeat(driveId, userId))
            .Should().ThrowExactly <NegativeIntException>();
        }