use of com.ctrip.framework.apollo.common.dto.ItemChangeSets in project apollo by ctripcorp.
the class PropertyResolverTest method testUpdateCommentItem.
@Test
public void testUpdateCommentItem() {
ItemChangeSets changeSets = resolver.resolve(1, "#ww\n" + "a=b\n" + "\n" + "b=c", mockBaseItemWith2Key1Comment1Blank());
Assert.assertEquals(1, changeSets.getDeleteItems().size());
Assert.assertEquals(0, changeSets.getUpdateItems().size());
Assert.assertEquals(1, changeSets.getCreateItems().size());
}
use of com.ctrip.framework.apollo.common.dto.ItemChangeSets in project apollo by ctripcorp.
the class PropertyResolverTest method testChangeItemNumLine.
@Test
public void testChangeItemNumLine() {
ItemChangeSets changeSets = resolver.resolve(1, "b=c\nc=d\na=b", mockBaseItemHas3Key());
Assert.assertEquals(3, changeSets.getUpdateItems().size());
}
use of com.ctrip.framework.apollo.common.dto.ItemChangeSets in project apollo by ctripcorp.
the class PropertyResolverTest method testUpdateItem.
@Test
public void testUpdateItem() {
ItemChangeSets changeSets = resolver.resolve(1, "a=d", mockBaseItemHas3Key());
List<ItemDTO> updateItems = changeSets.getUpdateItems();
Assert.assertEquals(1, updateItems.size());
Assert.assertEquals("d", updateItems.get(0).getValue());
}
Aggregations