diff --git a/src/Test/Logic/DimensionTest.cs b/src/Test/Logic/DimensionTest.cs new file mode 100644 index 000000000..c43ad570c --- /dev/null +++ b/src/Test/Logic/DimensionTest.cs @@ -0,0 +1,34 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Nikse.SubtitleEdit.Core.Common; + +namespace Test.Logic +{ + [TestClass] + public class DimensionTest + { + [TestMethod] + public void InvalidTest() + { + var dimension = new Dimension(); + Assert.AreEqual(0, dimension.Width); + Assert.AreEqual(0, dimension.Height); + Assert.IsTrue(!dimension.IsValid()); + } + + [TestMethod] + public void ValidTest() + { + var dimension = new Dimension(10, 10); + Assert.IsTrue(dimension.IsValid()); + } + + [TestMethod] + public void EqualityTest() + { + var dimensionOne = new Dimension(); + var dimensionTwo = new Dimension(); + Assert.AreEqual(dimensionOne, dimensionTwo); + Assert.IsTrue(dimensionOne == dimensionTwo); + } + } +} \ No newline at end of file diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj index 0bbe85949..c0c2f74a0 100644 --- a/src/Test/Test.csproj +++ b/src/Test/Test.csproj @@ -76,6 +76,7 @@ +