| Chunk |
|---|
| Conflicting content |
|---|
@RunWith(JMock.class) import static org.hamcrest.Matchers.equalTo; import static test.support.com.pyxis.petstore.builders.Entities.entities; import static test.support.com.pyxis.petstore.builders.ProductBuilder.aProduct; <<<<<<< HEAD import static test.support.com.pyxis.petstore.matchers.DomMatchers.*; ======= import static test.support.com.pyxis.petstore.matchers.DomMatchers.hasAttribute; import static test.support.com.pyxis.petstore.matchers.DomMatchers.hasChild; import static test.support.com.pyxis.petstore.matchers.DomMatchers.hasSelector; import static test.support.com.pyxis.petstore.matchers.DomMatchers.hasNoSelector; import static test.support.com.pyxis.petstore.matchers.DomMatchers.hasUniqueSelector; import static test.support.com.pyxis.petstore.matchers.DomMatchers.withText; import static test.support.com.pyxis.petstore.matchers.DomMatchers.withBlankText; >>>>>>> 3e8b5090d42ded272c8b53211c346622ba177786 import static test.support.com.pyxis.petstore.velocity.VelocityRendering.render; |
| Solution content |
|---|
import static org.hamcrest.Matchers.equalTo; import static test.support.com.pyxis.petstore.builders.Entities.entities; import static test.support.com.pyxis.petstore.builders.ProductBuilder.aProduct; import static test.support.com.pyxis.petstore.matchers.DomMatchers.*; import static test.support.com.pyxis.petstore.velocity.VelocityRendering.render; @RunWith(JMock.class) |
| File |
|---|
| ProductsViewTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
}
@Test
<<<<<<< HEAD
public void handlesProductWithNoDescriptionCorrectly() {
useDefaultPhoto();
productsPage = renderProductsPageUsing(aModelWith(
aProduct().withName("Labrador")));
assertThat(dom(productsPage),
hasSelector("#products td:nth-child(3)",
contains(anEmptyDescription())));
=======
public void displaysColumnHeadersOverListOfProductsFound() {
productsPage = renderProductsPageUsing(aModelWith(
aProduct().withName("Labrador").describedAs("Friendly").withPhoto("labrador")));
assertThat(dom(productsPage),
hasSelector("#products th",
inOrder(withBlankText(),
withText("Name"),
withText("Description"))));
>>>>>>> 3e8b5090d42ded272c8b53211c346622ba177786
}
// todo this behaviour should be on the photo or storage |
| Solution content |
|---|
}
@Test public void
handlesProductWithNoDescriptionCorrectly() {
useDefaultPhoto();
productsPage = renderProductsPageUsing(aModelWith(
aProduct().withName("Labrador")));
assertThat(dom(productsPage),
hasSelector("#products td:nth-child(3)",
contains(anEmptyDescription())));
}
// todo this behaviour should be on the photo or storage |
| File |
|---|
| ProductsViewTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
@Test
hasSelector("#products td:nth-child(1)",
contains(image(DEFAULT_PHOTO))));
}
<<<<<<< HEAD
private void useDefaultPhoto() {
context.checking(new Expectations() {{
allowing(storage).getLocation(with(any(String.class))); will(returnValue(DEFAULT_PHOTO));
}});
}
private String renderProductsPageUsing(Map |
| Solution content |
|---|
hasSelector("#products td:nth-child(1)",
contains(image(DEFAULT_PHOTO))));
}
@Test public void
displaysNoProductsTableIfNoProductIsFound() {
productsPage = renderProductsPageUsing(anEmptyModel());
assertThat(dom(productsPage), hasNoSelector("#products"));
}
private void useDefaultPhoto() {
context.checking(new Expectations() {{
allowing(storage).getLocation(with(any(String.class))); will(returnValue(DEFAULT_PHOTO));
}});
}
private Map |
| File |
|---|
| ProductsViewTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |