Beispiel #1
0
        public void ConvertSDKBOTTOMRIGHTToAPIBOTTOMRIGHT()
        {
            sdkTextAnchorPosition1 = OneSpanSign.Sdk.TextAnchorPosition.BOTTOMRIGHT;
            apiTextAnchorPosition1 = new TextAnchorPositionConverter(sdkTextAnchorPosition1).ToAPIAnchorPoint();

            Assert.AreEqual("BOTTOMRIGHT", apiTextAnchorPosition1);
        }
Beispiel #2
0
        public void ConvertSDKTOPLEFTToAPITOPLEFTT()
        {
            sdkTextAnchorPosition1 = OneSpanSign.Sdk.TextAnchorPosition.TOPLEFT;
            apiTextAnchorPosition1 = new TextAnchorPositionConverter(sdkTextAnchorPosition1).ToAPIAnchorPoint();

            Assert.AreEqual("TOPLEFT", apiTextAnchorPosition1);
        }
Beispiel #3
0
        public void ConvertAPIUnknonwnValueToUnrecognizedTextAnchorPosition()
        {
            apiTextAnchorPosition1 = "NEWLY_ADDED_TEXT ANCHOR POSITION";
            sdkTextAnchorPosition1 = new TextAnchorPositionConverter(apiTextAnchorPosition1).ToSDKTextAnchorPosition();

            Assert.AreEqual(sdkTextAnchorPosition1.getApiValue(), apiTextAnchorPosition1);
        }
Beispiel #4
0
        public void ConvertAPIBOTTOMRIGHTToBOTTOMRIGHTTextAnchorPosition()
        {
            apiTextAnchorPosition1 = "BOTTOMRIGHT";
            sdkTextAnchorPosition1 = new TextAnchorPositionConverter(apiTextAnchorPosition1).ToSDKTextAnchorPosition();

            Assert.AreEqual(apiTextAnchorPosition1, sdkTextAnchorPosition1.getApiValue());
        }
Beispiel #5
0
        public void ConvertAPITOPLEFTToTOPLEFTTextAnchorPosition()
        {
            apiTextAnchorPosition1 = "TOPLEFT";
            sdkTextAnchorPosition1 = new TextAnchorPositionConverter(apiTextAnchorPosition1).ToSDKTextAnchorPosition();

            Assert.AreEqual(apiTextAnchorPosition1, sdkTextAnchorPosition1.getApiValue());
        }
Beispiel #6
0
        public void whenBuildingTextAnchorPositionWithUnknownAPIValueThenUNRECOGNIZEDTextAnchorPositionIsReturned()
        {
            string expectedSDKValue = "UNRECOGNIZED";


            OneSpanSign.Sdk.TextAnchorPosition classUnderTest = OneSpanSign.Sdk.TextAnchorPosition.valueOf("ThisTextAnchorPositionDoesNotExistINSDK");
            String actualSDKValue = classUnderTest.getSdkValue();


            Assert.AreEqual(expectedSDKValue, actualSDKValue);
        }
Beispiel #7
0
        public void whenBuildingTextAnchorPositionWithAPIValueBOTTOMRIGHTThenBOTTOMRIGHTTextAnchorPositionIsReturned()
        {
            string expectedSDKValue = "BOTTOMRIGHT";


            OneSpanSign.Sdk.TextAnchorPosition classUnderTest = OneSpanSign.Sdk.TextAnchorPosition.valueOf("BOTTOMRIGHT");
            String actualSDKValue = classUnderTest.getSdkValue();


            Assert.AreEqual(expectedSDKValue, actualSDKValue);
        }
Beispiel #8
0
 public TextAnchorBuilder AtPosition(TextAnchorPosition position)
 {
     this.position = position;
     return(this);
 }