Beispiel #1
0
        public void GetType_StructureBetweenBraces_ReturnObject(string inputLine)
        {
            //Arrange
            JpropertyTypeDeterminator stringValueTypeDeterminator = new JpropertyTypeDeterminator();

            //Act
            PropertyType Result = stringValueTypeDeterminator.Get(inputLine);

            //Assert
            Assert.Equal(PropertyType.Object, Result);
        }
Beispiel #2
0
        public void GetType_Array_ReturnList()
        {
            //Arrange
            JpropertyTypeDeterminator stringValueTypeDeterminator = new JpropertyTypeDeterminator();

            //Act
            PropertyType Result = stringValueTypeDeterminator.Get("[{\"RoomTypeId\": 309271, \"Physical\": null, \"DateInventories\": [{\"Date\": \"2021-03-11T00:00:00\", \"OutOfOrder\": 0, \"Sold\": 0}]}]");

            //Assert
            Assert.Equal(PropertyType.List, Result);
        }
Beispiel #3
0
        public void GetType_SomeNumber_ReturnNumber(string inputLine)
        {
            //Arrange
            JpropertyTypeDeterminator stringValueTypeDeterminator = new JpropertyTypeDeterminator();

            //Act
            PropertyType Result = stringValueTypeDeterminator.Get(inputLine);

            //Assert
            Assert.Equal(PropertyType.Number, Result);
        }
Beispiel #4
0
        public void GetType_AnyOfTwoDateTypes_ReturnDate(string inputLine)
        {
            //Arrange
            JpropertyTypeDeterminator stringValueTypeDeterminator = new JpropertyTypeDeterminator();

            //Act
            PropertyType Result = stringValueTypeDeterminator.Get(inputLine);

            //Assert
            Assert.Equal(PropertyType.DateTime, Result);
        }
Beispiel #5
0
        public void GetType_EmptyString_ReturnString(string inputLine)
        {
            //Arrange
            JpropertyTypeDeterminator stringValueTypeDeterminator = new JpropertyTypeDeterminator();

            //Act
            PropertyType Result = stringValueTypeDeterminator.Get(inputLine);

            //Assert
            Assert.Equal(PropertyType.String, Result);
        }