예제 #1
0
        public async void GenerateClassDiagram_WheGivenSingleClassWithGenericProperty_ShouldReturnDiagramUrl()
        {
            // Get image uri
            var imageUri = await YumlFactory.Create <Manager>().GenerateClassDiagramUri(DetailLevel.PublicProperties);

            // Verify that the uri is actually an image
            var response = await this.client.GetAsync(imageUri);

            var result = await response.Content.ReadAsStringAsync();

            Console.WriteLine("Image URI: {0}", imageUri.Replace("http://yuml.me/", "http://yuml.me/edit/"));

            Assert.IsTrue(response.IsSuccessStatusCode);
            Assert.That(response.Content.Headers.ContentType.MediaType == "image/png");
        }
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            backgroundPosition = new Vector2(-150.0f,-150.0f);
            screenWidth = Window.ClientBounds.Width;
            screenHeight = Window.ClientBounds.Height;

            shipPosition = new Vector2((float)(screenWidth / 2), (float)(screenHeight / 2));

            backgroundAppearance = Content.Load<Texture2D>("background.jpg");

            shipAppearance = Content.Load<Texture2D>("ship.png");

            bulletAppearance = Content.Load<Texture2D>("plasma.png");

            asteroidAppearance = Content.Load<Texture2D>("asteroid.png");

            powerUpAppearance = Content.Load<Texture2D>("powerup.png");

            weaponsList.Add(new SoloBlaster(Content));
            weaponsList.Add(new DualBlaster(Content));
            weaponsList.Add(new TripleBlaster(Content));
            weaponsList.Add(new QuadBlaster(Content));
            weaponsList.Add(new PentaBlaster(Content));

            currentWeapon = weaponsList[currentWeaponIndex];

            asteroidTopSpawnerPos = new Vector2(Window.ClientBounds.Width / 2, -49);
            asteroidLeftSpawnerPos = new Vector2(-49, Window.ClientBounds.Height / 2);
            asteroidRightSpawnerPos = new Vector2(Window.ClientBounds.Width + 49, Window.ClientBounds.Height / 2);
            asteroidBotSpawnerPos = new Vector2(Window.ClientBounds.Width / 2, Window.ClientBounds.Height + 49);

            //mciSendString(@"open C:\Users\esatk\Desktop\Ascendency.wav type waveaudio alias Ascendency", null, 0, IntPtr.Zero);
            //mciSendString(@"play Ascendency", null, 0, IntPtr.Zero);

            gameFont = Content.Load<SpriteFont>("spaceFont");

            var types = new List<Type>
                {
                    typeof(HoneyShipGame),
                    typeof(GamepadController),
                    typeof(InputController),
                    typeof(MainController),
                    typeof(CreateEntity),
                    typeof(For),
                    typeof(Instruction),
                    typeof(Repeat),
                    typeof(Semicolon),
                    typeof(Wait),
                    typeof(Blaster),
                    typeof(DualBlaster),
                    typeof(PentaBlaster),
                    typeof(QuadBlaster),
                    typeof(SoloBlaster),
                    typeof(TripleBlaster),
                    typeof(Weapon<Entity>),
                    typeof(Entity)
                };
            var factory = new YumlFactory(types);
            var imageUri = factory.GenerateClassDiagramUri();
            Console.WriteLine("Test");
        }