diff options
author | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2019-07-22 09:53:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-22 09:53:17 +0000 |
commit | b491faf8b57779addeb41def6be4c8977d0d5acd (patch) | |
tree | 01e24443898a4786310ca835e0b6a36b7e50b707 /vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java | |
parent | 7777af2d57f3461b06f8c787cfb6e33c3b01e8a6 (diff) | |
parent | 25245136c711cb4b1ed3c8e351a79e3572512434 (diff) |
Merge "Pnf pojo improvements"
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java index 2d7d2aad3..7a5d3ad91 100644 --- a/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/aai/model/AaiGetPnfs/PnfTest.java @@ -3,13 +3,14 @@ * VID * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 Nokia. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,16 +21,30 @@ package org.onap.vid.aai.model.AaiGetPnfs; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; -import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters; -import static org.hamcrest.MatcherAssert.assertThat; +import org.junit.Test; public class PnfTest { @Test - public void shouldHaveValidGettersAndSetters(){ - assertThat(Pnf.class, hasValidGettersAndSetters()); - } + public void builder_shouldProperlyConstructObject() { + Pnf pnf = Pnf.builder() + .withPnfId("pnfId") + .withPnfName("TestPnf") + .withPnfName2("pnfName2") + .withPnfName2Source("pnfNameSource") + .withEquipModel("model") + .withEquipType("type") + .withEquipVendor("vendor") + .build(); + assertThat(pnf.getPnfId()).isEqualTo("pnfId"); + assertThat(pnf.getPnfName()).isEqualTo("TestPnf"); + assertThat(pnf.getPnfName2()).isEqualTo("pnfName2"); + assertThat(pnf.getPnfName2Source()).isEqualTo("pnfNameSource"); + assertThat(pnf.getEquipModel()).isEqualTo("model"); + assertThat(pnf.getEquipType()).isEqualTo("type"); + assertThat(pnf.getEquipVendor()).isEqualTo("vendor"); + } } |