Debian Codegraph @

contrib/C#/NGraphiteTests/FeaturevalTests.cs

raw
1 // SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later
2 // Copyright (C) 2012 SIL International
3 using System;
4 using NUnit.Framework;
5 using NGraphite;
6
7 namespace NGraphiteTests
8 {
9 [TestFixture()]
10 public class FeaturevalTests
11 {
12 Face _face;
13
14 [SetUp]
15 public void PerTestSetup()
16 {
17 _face = new Face(TestConstants.PaduakFontLocation, FaceOptions.face_default);
18 }
19
20 [TearDown]
21 public void PerTestTearDown()
22 {
23 _face.Dispose();
24 }
25
26 [Test()]
27 public void Clone_TestFeatureVal_ReturnsNonNullFeatureValWhichIsDifferentInstanceToClonedObject()
28 {
29 using(Featureval val = _face.FeaturevalForLang("en"))
30 {
31 Featureval clonedVal = val.Clone();
32 Assert.NotNull(clonedVal);
33 Assert.AreNotSame(clonedVal, val);
34 }
35 }
36 }
37 }
38