Hey,
I need to create UDataTable
object (or something similar) to write tests on my function.
I want to create object and add few values depending on test I do. My RowBase is FMyKeywordRowBase
given below.
/// Simple Test Example
UDataTable* data_table = {}; // make some DT
data_table // add new row
return call_my_function(data_table); // Returns true/false
/// RowBase for DataTable
USTRUCT(BlueprintType)
struct FMyKeywordRowBase : public FTableRowBase
{
public:
GENERATED_BODY()
/// UEnum
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
EN_KeywordsGroups Group;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
FString Keyword;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
FString Description;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
bool AddExplanation;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
FString OverrideWordHelper;
};