public void EqualsMethodTestOnOtherTypes() { AssertTypesAreSame(GBaseAttributeType.ForName("xxx"), GBaseAttributeType.ForName("xxx")); AssertTypesAreDifferent(GBaseAttributeType.ForName("xxx"), GBaseAttributeType.ForName("xyx")); }
public void ForNameCreatesNewOtherTypes() { GBaseAttributeType other1 = GBaseAttributeType.ForName("sometype"); Assert.AreEqual("sometype", other1.Name, "name"); Assert.AreEqual(StandardGBaseAttributeTypeIds.otherType, other1.Id); }
private void AssertTypesAreDifferent(GBaseAttributeType typeA, GBaseAttributeType typeB) { Assert.IsFalse(typeA.Equals(typeB), "equals"); Assert.IsTrue(typeA != typeB, "operator !="); Assert.IsFalse(typeA == typeB, "operator =="); }
public void ForNameDoesNotCreateNewStandardTypes() { foreach (GBaseAttributeType type in GBaseAttributeType.AllStandardTypes) { Assert.IsTrue(Object.ReferenceEquals(type, GBaseAttributeType.ForName(type.Name))); } }
private void AssertTypesAreSame(GBaseAttributeType typeA, GBaseAttributeType typeB) { Assert.IsTrue(typeA.Equals(typeB), "equals"); Assert.IsFalse(typeA != typeB, "operaton !="); Assert.IsTrue(typeA == typeB, "operator =="); Assert.AreEqual(typeA.GetHashCode(), typeB.GetHashCode(), "HashCode"); }
public void GenerateTest() { AssertRereadIsSame(new GBaseAttribute("bozo", GBaseAttributeType.ForName("clown"), "oops !")); }