public void IncreaseUtilizationServiceTest()
        {
            //arrange
            var context = SetUpApplicationContext();
            var service = new SpaceshipService(context);

            //act
            service.IncreaseUltilization();
            //assert
            Assert.Equal(21, context.Spaceships.Find((long)1).Utilization);
        }
        public void ChangetheLocationServiceTest()
        {
            //arrange
            var context = SetUpApplicationContext();
            var service = new SpaceshipService(context);

            //act
            service.ChangeTheLocation((long)1);
            //assert
            Assert.Equal(1, context.Spaceships.Find((long)1).Max_capacity);
        }
        public void GetUtilizationServiceTest()
        {
            //arrange
            var context = SetUpApplicationContext();
            var service = new SpaceshipService(context);

            //act
            var utilization = service.GetUltilization();

            //assert
            Assert.Equal(20, utilization);
        }
Exemplo n.º 4
0
 public EnvironmentRunner(SpaceshipService spaceshipService)
 {
     spaceshipSvc = spaceshipService;
 }