Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@
* herein. The information contained herein is subject to change
* without notice.
*/
package com.fortify.cli.aviator.fod.cli.cmd;
package com.fortify.cli.fod.aviator;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.*;

import java.lang.reflect.Field;

import org.junit.jupiter.api.Test;

import com.fortify.cli.common.exception.FcliSimpleException;
import com.fortify.cli.fod.aviator.cmd.FoDAviatorApplyRemediationsCommand;

class AviatorFoDApplyRemediationsCommandTest {
class FoDAviatorApplyRemediationsCommandTest {
@Test
void testSourceCodeDirectoryHasDefaultValue() throws Exception {
AviatorFoDApplyRemediationsCommand command = new AviatorFoDApplyRemediationsCommand();
FoDAviatorApplyRemediationsCommand command = new FoDAviatorApplyRemediationsCommand();

Field field = AviatorFoDApplyRemediationsCommand.class.getDeclaredField("sourceCodeDirectory");
Field field = FoDAviatorApplyRemediationsCommand.class.getDeclaredField("sourceCodeDirectory");
field.setAccessible(true);
String fieldValue = (String) field.get(command);

Expand All @@ -40,9 +39,9 @@ void testSourceCodeDirectoryHasDefaultValue() throws Exception {

@Test
void testSourceCodeDirectoryCanBeOverridden() throws Exception {
AviatorFoDApplyRemediationsCommand command = new AviatorFoDApplyRemediationsCommand();
FoDAviatorApplyRemediationsCommand command = new FoDAviatorApplyRemediationsCommand();

Field field = AviatorFoDApplyRemediationsCommand.class.getDeclaredField("sourceCodeDirectory");
Field field = FoDAviatorApplyRemediationsCommand.class.getDeclaredField("sourceCodeDirectory");
field.setAccessible(true);

String customPath = "/custom/source/directory";
Expand All @@ -56,9 +55,9 @@ void testSourceCodeDirectoryCanBeOverridden() throws Exception {

@Test
void testBlankSourceCodeDirectoryThrowsException() throws Exception {
AviatorFoDApplyRemediationsCommand command = new AviatorFoDApplyRemediationsCommand();
FoDAviatorApplyRemediationsCommand command = new FoDAviatorApplyRemediationsCommand();

Field field = AviatorFoDApplyRemediationsCommand.class.getDeclaredField("sourceCodeDirectory");
Field field = FoDAviatorApplyRemediationsCommand.class.getDeclaredField("sourceCodeDirectory");
field.setAccessible(true);
field.set(command, "");

Expand Down
Loading