package enum

import (
	"fmt"
	"testing"
)

func TestSessionCheck(t *testing.T) {
	// 0 -> 00000000
	needNoSession := NewSessCheck(0)
	fmt.Printf("needNoSession ============\nneedCheck %v \nuserId %v \nentId:%v\n", needNoSession.NeedCheck(), needNoSession.CheckUserSession(), needNoSession.CheckEntSession())

	// 1 -> 00000010
	needUserSession := NewSessCheck(1)
	fmt.Printf("needUserSession  ============\nneedCheck %v \nuserId %v \nentId:%v\n", needUserSession.NeedCheck(), needUserSession.CheckUserSession(), needUserSession.CheckEntSession())

	// 2 -> 00000010
	needEntSession := NewSessCheck(2)
	fmt.Printf("needEntSession  ============\nneedCheck %v \nuserId %v \nentId:%v\n", needEntSession.NeedCheck(), needEntSession.CheckUserSession(), needEntSession.CheckEntSession())

	// 3 -> 00000011
	needEntAndUserSession := NewSessCheck(3)
	fmt.Printf("needEntAndUserSession  ============\nneedCheck %v \nuserId %v \nentId:%v\n", needEntAndUserSession.NeedCheck(), needEntAndUserSession.CheckUserSession(), needEntAndUserSession.CheckEntSession())

	// 4 -> 00000100
	otherSession := NewSessCheck(4)
	fmt.Printf("needFullerSession  ============\nneedCheck %v \nuserId %v \nentId:%v\n", otherSession.NeedCheck(), otherSession.CheckUserSession(), otherSession.CheckEntSession())

	//is not need

}

func TestStatusCheck(t *testing.T) {
	// 0 -> 00000000
	needNoStatusCheck := NewAccountCheck(0)
	fmt.Printf("needNoStatusCheck ============\nneedCheck %v \nuserId %v \nentId:%v\n", needNoStatusCheck.NeedCheck(), needNoStatusCheck.CheckUserAccount(), needNoStatusCheck.CheckEntAccount())

	// 1 -> 00000010
	needUserStatus := NewAccountCheck(1)
	fmt.Printf("needUserAccount  ============\nneedCheck %v \nuserId %v \nentId:%v\n", needUserStatus.NeedCheck(), needUserStatus.CheckUserAccount(), needUserStatus.CheckEntAccount())

	// 2 -> 00000010
	needEntStatus := NewAccountCheck(2)
	fmt.Printf("needEntAccount  ============\nneedCheck %v \nuserId %v \nentId:%v\n", needEntStatus.NeedCheck(), needEntStatus.CheckUserAccount(), needEntStatus.CheckEntAccount())

	// 3 -> 00000011
	needEntAndUserStatus := NewAccountCheck(3)
	fmt.Printf("needEntAndUserStatus  ============\nneedCheck %v \nuserId %v \nentId:%v\n", needEntAndUserStatus.NeedCheck(), needEntAndUserStatus.CheckUserAccount(), needEntAndUserStatus.CheckEntAccount())

	// 4 -> 00000100
	otherStatus := NewAccountCheck(4)
	fmt.Printf("otherStatus  ============\nneedCheck %v \nuserId %v \nentId:%v\n", otherStatus.NeedCheck(), otherStatus.CheckUserAccount(), otherStatus.CheckEntAccount())
}
