String code = "@media (application-dpi: 240) and (os-platform: \"Android\") ";
List<ICSSMediaQueryCondition> mediaQueryConditions = getCSSMediaQueryCondition(code);
assertThat("mediaQueryConditions.size()" , mediaQueryConditions.size(), is(2) );
ICSSMediaQueryCondition mediaQueryCondition1 = mediaQueryConditions.get(0);
assertThat("mediaQueryCondition1.getOperator()" , mediaQueryCondition1.getOperator(), is( CSSModelTreeType.MEDIA_QUERY_CONDITION ) );
assertThat("mediaQueryCondition1.getKey()" , mediaQueryCondition1.getKey(), is( (String) null ) );
assertThat("mediaQueryCondition1.getValue()" , mediaQueryCondition1.getValue(), not( (ICSSPropertyValue) null ) );
assertTrue( mediaQueryCondition1.getValue() instanceof CSSKeywordPropertyValue );
CSSKeywordPropertyValue property1 = (CSSKeywordPropertyValue) mediaQueryCondition1.getValue();
assertThat("property1.getOperator()" , property1.getOperator(), is( CSSModelTreeType.PROPERTY_VALUE ) );
assertThat("property1.getKey()" , property1.getKeyword(), is( "(application-dpi: 240)" ) );
ICSSMediaQueryCondition mediaQueryCondition2 = mediaQueryConditions.get(0);
assertThat("mediaQueryCondition2.getOperator()" , mediaQueryCondition2.getOperator(), is( CSSModelTreeType.MEDIA_QUERY_CONDITION ) );
assertThat("mediaQueryCondition2.getKey()" , mediaQueryCondition2.getKey(), is( (String) null ) );
assertThat("mediaQueryCondition2.getValue()" , mediaQueryCondition2.getValue(), not( (ICSSPropertyValue) null ) );
assertTrue( mediaQueryCondition2.getValue() instanceof CSSKeywordPropertyValue );
CSSKeywordPropertyValue property2 = (CSSKeywordPropertyValue) mediaQueryCondition2.getValue();
assertThat("property2.getOperator()" , property2.getOperator(), is( CSSModelTreeType.PROPERTY_VALUE ) );
assertThat("property2.getKey()" , property2.getKeyword(), is( "(application-dpi: 240)" ) );
}