gitlab.com/evatix-go/core@v1.3.55/tests/testwrappers/chmodhelpertestwrappers/RwxInstructionTestWrapper.go (about)

     1  package chmodhelpertestwrappers
     2  
     3  import (
     4  	"gitlab.com/evatix-go/core/chmodhelper"
     5  	"gitlab.com/evatix-go/core/chmodhelper/chmodins"
     6  	"gitlab.com/evatix-go/core/coretests"
     7  )
     8  
     9  type RwxInstructionTestWrapper struct {
    10  	RwxInstructions []chmodins.RwxInstruction
    11  	DefaultRwx      *chmodins.RwxOwnerGroupOther
    12  	IsErrorExpected bool
    13  	CreatePaths     []*chmodhelper.DirFilesWithRwxPermission
    14  	funcName        coretests.TestFuncName
    15  	expected        chmodins.RwxOwnerGroupOther
    16  	actual          interface{}
    17  }
    18  
    19  func (receiver *RwxInstructionTestWrapper) Actual() interface{} {
    20  	return receiver.actual
    21  }
    22  
    23  func (receiver *RwxInstructionTestWrapper) SetActual(actual interface{}) {
    24  	receiver.actual = actual
    25  }
    26  
    27  func (receiver *RwxInstructionTestWrapper) FuncName() string {
    28  	return receiver.funcName.Value()
    29  }
    30  
    31  func (receiver *RwxInstructionTestWrapper) Value() interface{} {
    32  	return receiver
    33  }
    34  
    35  func (receiver *RwxInstructionTestWrapper) Expected() interface{} {
    36  	return receiver.expected
    37  }
    38  
    39  func (receiver *RwxInstructionTestWrapper) ExpectedAsRwxOwnerGroupOtherInstruction() chmodins.RwxOwnerGroupOther {
    40  	return receiver.expected
    41  }
    42  
    43  func (receiver *RwxInstructionTestWrapper) AsTestCaseMessenger() coretests.TestCaseMessenger {
    44  	var testCaseMessenger coretests.TestCaseMessenger = receiver
    45  
    46  	return testCaseMessenger
    47  }