Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
MSANDBOC-51 OsTest continued
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/maven/sandbox/trunk@1156670 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
struberg committed Aug 11, 2011
1 parent d23bc36 commit 316dcf3
Showing 1 changed file with 36 additions and 4 deletions.
Expand Up @@ -170,19 +170,19 @@ public void testGetValidFamilies()
public void testIsArch()
{
assertThat( "Arch is i386"
, Os.isArch("i386")
, Os.isArch( "i386" )
, is( true ) );

assertThat( "Os is not Mac"
, Os.isArch("x86_64")
, Os.isArch( "x86_64" )
, is( false ) );
}

@Test
public void testIsFamily()
{
assertThat( "Family is os/2"
, Os.isFamily(Os.FAMILY_OS2)
, Os.isFamily( Os.FAMILY_OS2 )
, is( true ) );

assertThat( "Family is not mac"
Expand All @@ -194,8 +194,40 @@ public void testIsFamily()
public void testIsName()
{
assertThat( "Name is os/2"
, Os.isName(Os.FAMILY_OS2)
, Os.isName( "os/2" )
, is( true ) );

assertThat( "Name is not Mac OS X"
, Os.isName( "Mac OS X" )
, is( false ) );
}

@Test
public void testIsValidFamily()
{
assertThat( "os/2 isValidFamily"
, Os.isValidFamily( Os.FAMILY_OS2 )
, is( true ) );

assertThat( "iPone != isValidFamily"
, Os.isValidFamily( "iPhone" )
, is( false ) );
}

@Test
public void testIsVersion()
{
assertThat( "isVersion"
, Os.isVersion( "2.1.32" )
, is( true ) );

assertThat( "isVersion"
, Os.isVersion( "2.1" )
, is( false ) );

assertThat( "isVersion"
, Os.isVersion( "4.5" )
, is( false ) );

}
}

0 comments on commit 316dcf3

Please sign in to comment.