|
using System;
using System.Globalization;
namespace CodeProject.VisualStudio.QualityTools.UnitTestFramework
{
internal static class FrameworkMessages
{
static FrameworkMessages()
{
Properties.Resources.Culture = CultureInfo.CurrentCulture;
}
private static string Format(string format, params object[] parameters)
{
return string.Format(CultureInfo.CurrentCulture,
format, parameters);
}
public static string SpecificationFailed(string specificationName)
{
return Format(Properties.Resources.SpecificationFailed,
specificationName);
}
public static string NullInMessages()
{
return Properties.Resources.NullInMessages;
}
public static string DifferentNumberOfElements()
{
return Properties.Resources.DifferentNumberOfElements;
}
public static string ElementsDoNotMatch(int index)
{
return Format(Properties.Resources.ElementsDoNotMatch,
index);
}
public static string ElementsMatch()
{
return Properties.Resources.ElementsMatch;
}
public static string SameCollections()
{
return Properties.Resources.SameCollections;
}
public static string ExceptionTypeMismatch(Type expected, Type actual)
{
return Format(Properties.Resources.ExceptionTypeMismatch,
expected, actual);
}
public static string ExceptionNotThrown(Type expected)
{
return Format(Properties.Resources.ExceptionNotThrown,
expected);
}
public static string UnexpectedException(Type type)
{
return Format(Properties.Resources.UnexpectedException,
type);
}
public static string UnequalValues(object expected, object actual)
{
return Format(Properties.Resources.UnequalValues,
expected, actual);
}
public static string NumericTypeExpected(Type type)
{
return Format(Properties.Resources.NumericTypeExpected,
type);
}
public static string DifferenceTooGreat(object expected, object actual, object delta)
{
return Format(Properties.Resources.DifferenceTooGreat,
expected, actual, delta);
}
public static string DifferenceTooLittle(object expected, object actual, object delta)
{
return Format(Properties.Resources.DifferenceTooLittle,
expected, actual, delta);
}
public static string NotNull(object actual)
{
return Format(Properties.Resources.NotNull,
actual);
}
public static string ValueTypesGiven()
{
return Properties.Resources.ValueTypesGiven;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Windows developer with 10+ years experience working in the banking industry.