コード例 #1
0
        public virtual void test_toBuilder()
        {
            SecurityInfo test = SecurityInfo.builder().addAttribute(AttributeType.NAME, "name").id(ID).priceInfo(PRICE_INFO).build().toBuilder().id(ID2).build();

            assertEquals(test.Id, ID2);
            assertEquals(test.getAttribute(AttributeType.NAME), "name");
        }
コード例 #2
0
        public virtual void test_builder()
        {
            SecurityInfo test = SecurityInfo.builder().id(ID).priceInfo(PRICE_INFO).addAttribute(AttributeType.NAME, "B").addAttribute(AttributeType.NAME, "A").build();

            assertEquals(test.Id, ID);
            assertEquals(test.PriceInfo, PRICE_INFO);
            assertEquals(test.Attributes, INFO_MAP);
            assertEquals(test.getAttribute(AttributeType.NAME), "A");
            assertEquals(test.findAttribute(AttributeType.NAME), ("A"));
        }