public void AutoBodyTest() { var generator = new MethodBodyGenerator(); var bodyData = new BodyData() { IsAuto = true, Body = "ShouldBeIgnored" }; var result = generator.Generate(bodyData); Assert.AreEqual(";", result); }
public void NonAutoNullBodyTest() { var generator = new MethodBodyGenerator(); var bodyData = new BodyData() { IsAuto = false, Body = "" }; var result = generator.Generate(bodyData); Assert.AreEqual("{ }", result); }
public void InvalidDataTypeTest() { var generator = new MethodBodyGenerator(); Assert.Throws(typeof(InvalidOperationException), () => generator.Generate(123)); }
public void NullDataTest() { var generator = new MethodBodyGenerator(); Assert.Throws(typeof(ArgumentNullException), () => generator.Generate(null)); }