gitlab.com/evatix-go/core@v1.3.55/tests/testwrappers/coredynamictestwrappers/ReflectSetFromToTestWrapper.go (about) 1 package coredynamictestwrappers 2 3 import ( 4 "gitlab.com/evatix-go/core/coretests" 5 "gitlab.com/evatix-go/core/corevalidator" 6 ) 7 8 type ReflectSetFromToTestWrapper struct { 9 Header string 10 From, To, ExpectedValue, actual interface{} 11 IsUsePointerInFrom bool 12 IsErrorExpected bool 13 Validator corevalidator.TextValidator 14 } 15 16 func (it ReflectSetFromToTestWrapper) CaseTitle() string { 17 return it.Header 18 } 19 20 func (it ReflectSetFromToTestWrapper) Input() interface{} { 21 return it 22 } 23 24 func (it ReflectSetFromToTestWrapper) Expected() interface{} { 25 return it.ExpectedValue 26 } 27 28 func (it ReflectSetFromToTestWrapper) ToFieldToDraftType() *coretests.DraftType { 29 return coretests.AnyToDraftType(it.To) 30 } 31 32 func (it ReflectSetFromToTestWrapper) ToFieldToBytes() []byte { 33 return coretests.AnyToBytes(it.To) 34 } 35 36 func (it ReflectSetFromToTestWrapper) ExpectedFieldToDraftType() *coretests.DraftType { 37 return coretests.AnyToDraftType(it.ExpectedValue) 38 } 39 40 func (it ReflectSetFromToTestWrapper) ExpectedFieldToBytes() []byte { 41 return coretests.AnyToBytes(it.ExpectedValue) 42 } 43 44 func (it ReflectSetFromToTestWrapper) SetActual(actual interface{}) { 45 it.actual = actual 46 } 47 48 func (it ReflectSetFromToTestWrapper) Actual() interface{} { 49 return it.actual 50 } 51 52 func (it ReflectSetFromToTestWrapper) AsSimpleTestCaseWrapper() coretests.SimpleTestCaseWrapper { 53 return &it 54 } 55 56 func (it *ReflectSetFromToTestWrapper) AsSimpleTestCaseWrapperContractsBinder() coretests.SimpleTestCaseWrapperContractsBinder { 57 return it 58 }