NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

@Nested

@DisplayName("Function getObjectFieldMap(_Object)")

@TestInstance(TestInstance.Lifecycle.PER_CLASS) class TestgetObjectFieldMap {


private _Object object = new _Object();

private _Object object1 = new _Object();

private _Object allObject = new _Object();

private _Object allObject1 = new _Object();


private List<_Field> fields1 = new ArrayList<>();

private List<_Field> fields2 = new ArrayList<>();

private List<_Field> fields3 = new ArrayList<>();

private List<_Field> fields4 = new ArrayList<>();

private Map<Long, _Field> objectFieldMap = new HashMap<Long, _Field>();



/*
* Setup
*/
@BeforeEach
void setup() {
object.setId(1L);
allObject.setId(3L);
_Field field1 = new _Field();
_Field field2 = new _Field();

_Field field3 = new _Field();
_Field field4 = new _Field();

field1.setId(2L);
field2.setId(4L);

fields1.add(field1);
fields2.add(field2);

fields3.add(field3);
fields4.add(field4);

object.setFields(fields1);
allObject.setFields(fields2);

object1.setFields(fields3);
allObject1.setFields(fields4);

}

/**
* Return HashMap when arguments are correct
*/
@Test
void return_HashMap_when_arguments_correct() throws Exception {
when(objectMetadataUtil.getObjectByName(anyString())).thenReturn(allObject);
objectFieldMap = datasetServiceImpl.getObjectFieldMap(object);
Assertions.assertEquals(2L,objectFieldMap.size());
}

// /**
// * Return Empty HashMap when argument is empty
// */
// @Test
// void return_empty_HashMap_when_arguments_is_empty() throws Exception{
// when(objectMetadataUtil.getObjectByName(anyString())).thenReturn(allObject1);
// objectFieldMap = datasetServiceImpl.getObjectFieldMap(object1);
// Assertions.assertEquals(0L,objectFieldMap.size());
// }




}
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.