Posts mit dem Label tutorial werden angezeigt. Alle Posts anzeigen
Posts mit dem Label tutorial werden angezeigt. Alle Posts anzeigen

Montag, 7. Oktober 2019

How to create Nav with Angular + Angular Material

To setup a basic navigation in Angular Material, type the following command in your terminal (e.g. I am using WebStorm IDE):

$ ng generate @angular/material:material.nav -name=main-nav

This will create a component named main-nav with all basic elements, fully responsive and free to modify.

Dienstag, 10. September 2019

Find Color for CSS layout in Dreamweaver - Hex Value with Color Picker

If you need the color from an image, just 


  • enter the color attribute in your CSS, e.g.


background-color: <type Ctrl + Enter> ;


  • Choose the color-selection option, 
  • choose Color picker and 
  • place it above the image.
  • Press Enter.


The value will appear in your CSS, e.g.: 

background-color: #25787F ;


Voilà!

Mittwoch, 21. August 2019

Docker Compose Webapps Port Forwarding

Multiple Webapps Inside Docker Compose Setup

  • Learn how to setup a custom network for your containers: container A talks to container B
  • Learn how to run multiple webapps inside Docker containers on different ports with Docker Compose
  • Create the network with $docker network create skynet
  • Run with $docker-compose up
  • Stop with $<Ctrl + C>
  • Clean up from time to time (beware, network will be deleted as well) with $docker system prune -a -f





Mittwoch, 17. April 2019

Mock static methods with Mockito in Java (mock, static, method, java)


import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.BDDMockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;


@RunWith(PowerMockRunner.class)
@PrepareForTest(MyStatic.class)
...


@Test
public void someTest() {
    
    //given    
    PowerMockito.mockStatic(MyStatic.class);
    BDDMockito.given(MyStatic.someStaticMethod()).willReturn(...);

    //when
    ...

    //then     
    PowerMockito.verifyStatic();
    MyStatic.someStaticMethod();

    assertThat(//your further asserts....

NEW BLOG! http://cleancode.consulting/

Dear Reader, This Blog is closed and remains as an archive. Please find our new Blog at  http://cleancode.consulting/