package com.cloudhandson.vpdbackoffice.domain.protectedobject;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

class ProtectedColumnTest {

  @Test
  void explainsPublicColumnAsDisplayDefaultWithoutCallingItAccessPermission() {
    ProtectedColumn column = new ProtectedColumn(1L, 1L, "TITLE", "N", null, "PUBLIC", "NONE");

    assertThat(column.sensitive()).isFalse();
    assertThat(column.sensitivityLabel()).isEqualTo("기본 표시");
    assertThat(column.redactionLabel()).isEqualTo("마스킹 없음");
    assertThat(column.displayPolicyLabel()).isEqualTo("기본 표시 · 마스킹 없음");
  }

  @Test
  void explainsProtectedColumnAsPostAccessDisplayHandling() {
    ProtectedColumn column = new ProtectedColumn(2L, 1L, "EMAIL", "Y", null, "CONFIDENTIAL", "NULLIFY");

    assertThat(column.sensitive()).isTrue();
    assertThat(column.displayPolicyLabel()).isEqualTo("기밀 · 값 숨김(NULL)");
  }
}
