public void ThrowsArgumentNullException() { var instance = new EntityFrameworkHelpers(); var result = instance.Generate("TestDhgms", null, true); this.OutputHelper.WriteLine(result); Assert.True(result.StartsWith("#error")); Assert.True(result.Contains("ArgumentNullException")); }
public void ReturnsCode() { var instance = new EntityFrameworkHelpers(); List<Tuple<IClassGenerationParameters, string>> classes = new List<Tuple<IClassGenerationParameters, string>> { new Tuple<IClassGenerationParameters, string>(new InformationInterfaceGeneratorTests.Cgp(), "SomeClassEf") }; var result = instance.Generate("TestDhgms", classes, true); Assert.NotNull(result); this.OutputHelper.WriteLine(result); }
public void ThrowsArgumentException() { var instance = new EntityFrameworkHelpers(); var cgp = new MockClassGenerationParameters(TestInputs.MainNamespaceName, TestInputs.SubNamespace, null, null, TestInputs.PropertiesDefault, null, null, 2010, null, null); List<Tuple<IClassGenerationParameters, string>> classes = new List<Tuple<IClassGenerationParameters, string>> { new Tuple<IClassGenerationParameters, string>(cgp, "SomeClassEf") }; var result = instance.Generate("TestDhgms", classes, true); this.OutputHelper.WriteLine(result); Assert.True(result.StartsWith("#error")); Assert.True(result.Contains("ArgumentException")); }