Package br.com.six2six.fixturefactory.model

Examples of br.com.six2six.fixturefactory.model.Client


    FixtureFactoryLoader.loadTemplates("br.com.six2six.template");
  }
 
  @Test
  public void fixtureClient() {
    Client client = Fixture.from(Client.class).gimme("valid");
    assertNotNull("Client should not be null", client);
    assertNotNull("Address should not be null", client.getAddress());
   
    Calendar expectedAge = Calendar.getInstance();
    expectedAge.add(Calendar.YEAR, -18);
    String expectedStringBirthday = new SimpleDateFormat("dd/MM/yyyy").format(expectedAge.getTime());
    assertEquals("client birthday should be 18 years ago", expectedAge.get(Calendar.YEAR), client.getBirthday().get(Calendar.YEAR));
    assertEquals(expectedStringBirthday, client.getBirthdayAsString());
  }
View Full Code Here


    }
  }
 
  @Test
  public void fixtureClientWithOverridedProperty() {
    Client client = Fixture.from(Client.class).gimme("valid", new Rule() {
      {
        add("name", "Fixture Factory");
      }
    });
   
    assertEquals("Fixture Factory", client.getName());
  }
View Full Code Here

    }
  }
 
  @Test
  public void shouldCreateClientWithAddressEqualToNull() {
    Client client = Fixture.from(Client.class).gimme("valid-noaddress");
   
    assertNotNull(client.getId());
    assertNull(client.getAddress());
  }
View Full Code Here

TOP

Related Classes of br.com.six2six.fixturefactory.model.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.