2012-11-08 22:30:53 +01:00
|
|
|
using System.IO;
|
2013-05-26 00:10:55 +02:00
|
|
|
using ChristianHelle.DeveloperTools.CodeGenerators.Resw.VSPackage.CustomTool;
|
2012-11-08 22:30:53 +01:00
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
|
|
|
|
|
|
namespace ChristianHelle.DeveloperTools.CodeGenerators.Resw.CustomTool.Tests
|
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
2012-11-11 00:06:25 +01:00
|
|
|
[DeploymentItem("Resources/Valid/Resources.resw")]
|
2012-11-08 22:30:53 +01:00
|
|
|
public class CodeGeneratorFactoryTests
|
|
|
|
|
{
|
|
|
|
|
private string reswFileContents;
|
2013-08-14 22:22:32 +02:00
|
|
|
private const string CLASS_NAME = "C:\\Test\\Resources\\Strings.resw";
|
2012-11-08 22:30:53 +01:00
|
|
|
|
|
|
|
|
[TestInitialize]
|
|
|
|
|
public void Initialize()
|
|
|
|
|
{
|
|
|
|
|
reswFileContents = File.ReadAllText("Resources.resw");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void CodeGeneratorFactoryReturnsValidInstance()
|
|
|
|
|
{
|
|
|
|
|
var target = new CodeGeneratorFactory();
|
2013-08-14 22:22:32 +02:00
|
|
|
var actual = target.Create(CLASS_NAME, "TestApp", reswFileContents);
|
2012-11-08 22:30:53 +01:00
|
|
|
Assert.IsNotNull(actual);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|