public AlertTest() { //mock setup alertMock = new Mock <IRedAlert>(); alertsMock = new List <IRedAlert> { alertMock.Object }; addAlertMock = new Mock <IAddAlert>(); updateAlertMock = new Mock <IUpdateAlert>(); redAlert = new RedAlert(); alerts = new List <RedAlert>(); //viewmodels mock setup alertViewModelMock = new Mock <IAlertViewModel>(); alertsViewModelMock = new List <IAlertViewModel>(); //sample models addAlert = new AddAlert { vehicleId = 1, time = DateTime.Now }; updateAlert = new UpdateAlert { vehicleId = 34, time = DateTime.Now }; //controller setup _logger = new Mock <ILogger <RedAlertController> >(); mockRepo = new Mock <IRepositoryWrapper>(); var allAlerts = GetAlerts(); alertController = new RedAlertController(_logger.Object, mockRepo.Object); }
protected override void LoadContent() { // Create the font Texture2D playerTexture = Content.Load <Texture2D>("sprites\\ship_main"); BGSoundControl(); LoadTextures(); LoadSoundEffects(); LoadFonts(); RedAlertInstance = RedAlert.CreateInstance(); RedAlertInstance.IsLooped = true; // Set text positions textMiddle = new Vector2(GraphicsDevice.Viewport.Width / 1.3f, graphics.GraphicsDevice.Viewport.Height / 30); textLeft = new Vector2(GraphicsDevice.Viewport.Width / 30, GraphicsDevice.Viewport.Height / 30); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); mb = new MovingBackground(graphics); PlayerShip = new Player(GraphicsDevice, new Vector2(400, 300), playerTexture); PlayerShip.SetContent(FireballTexture, BeamTexture, ArrowTexture); // TODO: use this.Content to load your game content here }