public void constructor_should_throw_on_function_without_method_name() { var invalidFunctions = new List <FunctionEntity> { new(FunctionsTestHelper.GetTestFunctionCode(null, null), 1, new FunctionId(Guid.NewGuid())) }; Assert.Throws <DomainException>(() => new CsharpCodeGenerator(new List <TestEntity>(), invalidFunctions, new CsharpCodeAnalyzer(), "")); }
public void constructor_should_throw_on_test_without_input_method_name() { var inGen = FunctionsTestHelper.GetTestFunctionCode(null, null); var outVal = FunctionsTestHelper.GetTestFunctionCode("outputValidator", null, "string", "bool", @"return test == ""test"";"); var invalidInputTest = new List <TestEntity> { new(new TestId(Guid.NewGuid()), outVal, inGen) }; Assert.Throws <DomainException>(() => new CsharpCodeGenerator(invalidInputTest, new List <FunctionEntity>(), new CsharpCodeAnalyzer(), "")); }