public void StaticInstances_Title() { WordLocation loc1 = WordLocation.Title; WordLocation loc2 = WordLocation.Title; Assert.AreEqual("Title", loc1.ToString(), "Invalid string representation"); Assert.AreEqual("Title", loc2.ToString(), "Invalid string representation"); Assert.IsTrue(loc1 == loc2, "loc1 should equal loc2"); Assert.IsTrue(loc1.Equals(loc2), "loc1 should equal loc2"); Assert.AreNotSame(loc2, loc1, "loc1 should not be the same object as loc2"); }
public void StaticInstances_Keywords() { WordLocation loc1 = WordLocation.Keywords; WordLocation loc2 = WordLocation.Keywords; Assert.Equal("Keywords", loc1.ToString()); Assert.Equal("Keywords", loc2.ToString()); Assert.True(loc1 == loc2, "loc1 should equal loc2"); Assert.True(loc1.Equals(loc2), "loc1 should equal loc2"); Assert.NotSame(loc2, loc1); }
public void StaticInstances_Title() { WordLocation loc1 = WordLocation.Title; WordLocation loc2 = WordLocation.Title; Assert.Equal("Title", loc1.ToString()); Assert.Equal("Title", loc2.ToString()); Assert.True(loc1 == loc2, "loc1 should equal loc2"); Assert.True(loc1.Equals(loc2), "loc1 should equal loc2"); Assert.NotSame(loc2, loc1); }
public void StaticInstances_Content() { WordLocation loc1 = WordLocation.Content; WordLocation loc2 = WordLocation.Content; Assert.Equal("Content", loc1.ToString()); Assert.Equal("Content", loc2.ToString()); Assert.True(loc1 == loc2, "loc1 should equal loc2"); Assert.True(loc1.Equals(loc2), "loc1 should equal loc2"); Assert.NotSame(loc2, loc1); }