Added Support for Visual Studio 2013 and Generating the class as Internal (C#) or Friend (VB)

This commit is contained in:
Christian Resma Helle
2013-08-15 14:52:10 +02:00
parent 2f134acc5e
commit 44b1f1ffd0
14 changed files with 136 additions and 35 deletions
@@ -1,6 +1,6 @@
using System.CodeDom;
using System.IO;
using System.Linq;
using System.Reflection;
using ChristianHelle.DeveloperTools.CodeGenerators.Resw.VSPackage.CustomTool;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -20,7 +20,7 @@ namespace ChristianHelle.DeveloperTools.CodeGenerators.Resw.CustomTool.Tests
{
reswFileContents = File.ReadAllText(FILE_PATH);
target = new CodeGeneratorFactory().Create(FILE_PATH.Replace(".resw", string.Empty), "TestApp", reswFileContents, classAccessibility: MemberAttributes.Assembly);
target = new CodeGeneratorFactory().Create(FILE_PATH.Replace(".resw", string.Empty), "TestApp", reswFileContents, classAccessibility: TypeAttributes.NestedAssembly);
actual = target.GenerateCode();
}
@@ -30,6 +30,12 @@ namespace ChristianHelle.DeveloperTools.CodeGenerators.Resw.CustomTool.Tests
Assert.IsNotNull(actual);
}
[TestMethod]
public void GeneratedCodeIsAnInternalClass()
{
Assert.IsTrue(actual.Contains("internal partial class"));
}
[TestMethod]
public void GeneratedCodeContainsPropertiesDefinedInResources()
{