Skip to content

Commit

Permalink
Unit tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
macmade committed Jun 22, 2015
1 parent 8f4dc99 commit baf3a6f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions UTI Tests/UTITest.m
Expand Up @@ -207,17 +207,39 @@ - ( void )test_UTIWithCFString

- ( void )test_UTIWithFileExtension
{
UTI * uti;

uti = [ UTI UTIWithFileExtension: @"txt" ];

XCTAssertNotNil( uti );
XCTAssertTrue( [ uti isEqualToUTI: [ UTI plainTextTypeUTI ] ] );
}

- ( void )test_UTIWithFileExtension_allowDynamic
{
UTI * uti;

uti = [ UTI UTIWithFileExtension: @"xyz" allowDynamic: NO ];

XCTAssertNil( uti );

uti = [ UTI UTIWithFileExtension: @"xyz" allowDynamic: YES ];

XCTAssertNotNil( uti );
XCTAssertTrue( uti.isDynamic );
}

- ( void )test_UTIWithFileExtension_ConformingTo
{
UTI * uti;

uti = [ UTI UTIWithFileExtension: @"txt" conformingTo: [ UTI textTypeUTI ] ];

XCTAssertNotNil( uti );

uti = [ UTI UTIWithFileExtension: @"txt" conformingTo: [ UTI imageTypeUTI ] ];

XCTAssertNil( uti );
}

- ( void )test_UTIWithFileExtension_ConformingTo_allowDynamic
Expand Down

0 comments on commit baf3a6f

Please sign in to comment.