public void SinglePointRectangleValueCanBeParsedWithoutColon() { var propertyValue = SgfPointRectangleValue.Parse("aa"); Assert.AreEqual(new SgfPoint(0, 0), propertyValue.Value.UpperLeft); Assert.AreEqual(new SgfPoint(0, 0), propertyValue.Value.LowerRight); }
public void SameColumnRectangleCanBeParsed() { var propertyValue = SgfPointRectangleValue.Parse("aa:ab"); Assert.AreEqual(new SgfPoint(0, 0), propertyValue.Value.UpperLeft); Assert.AreEqual(new SgfPoint(0, 1), propertyValue.Value.LowerRight); }
public void ValidPointRectangleValueCanBeParsed() { var propertyValue = SgfPointRectangleValue.Parse("aa:ZZ"); Assert.AreEqual(new SgfPoint(0, 0), propertyValue.Value.UpperLeft); Assert.AreEqual(new SgfPoint(51, 51), propertyValue.Value.LowerRight); }
public void RectangularPointRectangleCanBeSerialized() { var propertyValue = new SgfPointRectangleValue(new SgfPointRectangle(new SgfPoint(0, 0), new SgfPoint(51, 51))); Assert.AreEqual("aa:ZZ", propertyValue.Serialize()); }
public void SimpleOnePointPointRectangleCanBeSerialized() { var propertyValue = new SgfPointRectangleValue(new SgfPointRectangle(new SgfPoint(0, 0))); Assert.AreEqual("aa", propertyValue.Serialize()); }
public void BackwardsRectangleCantBeParsed() { SgfPointRectangleValue.Parse("cc:aa"); }
public void SinglePointRectangleValueCantBeParsedWithColon() { SgfPointRectangleValue.Parse("aa:aa"); }
public void InvalidPointRectangleValueCantBeParsedWithoutColon() { SgfPointRectangleValue.Parse("aaZZ"); }
public void InvalidPointRectangleValueCantBeParsed() { SgfPointRectangleValue.Parse("aa:Z"); }
public void NullParsingThrows() { SgfPointRectangleValue.Parse(null); }