Skip to content

Commit

Permalink
Add/cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ermau committed Jun 11, 2013
1 parent d8e6dee commit b1a9b6f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 12 deletions.
9 changes: 2 additions & 7 deletions tests/Xamarin.Auth.iOS.Test/AccountTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2012, Xamarin Inc.
// Copyright 2012-2013, Xamarin Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,14 +15,9 @@
//
using System;
using NUnit.Framework;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using Xamarin.Auth;
using System.Threading.Tasks;


namespace Xamarin.Auth.iOS.Test
namespace Xamarin.Auth.Test
{
[TestFixture]
public class AccountTest
Expand Down
6 changes: 2 additions & 4 deletions tests/Xamarin.Auth.iOS.Test/OAuth1Test.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2012, Xamarin Inc.
// Copyright 2012-2013, Xamarin Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,12 +15,10 @@
//
using System;
using NUnit.Framework;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using Xamarin.Auth;

namespace Xamarin.Auth.iOS.Test
namespace Xamarin.Auth.Test
{
[TestFixture]
public class OAuth1Test
Expand Down
46 changes: 46 additions & 0 deletions tests/Xamarin.Auth.iOS.Test/RequestTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// Copyright 2013, Xamarin Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Xamarin.Auth.Test
{
[TestFixture]
public class RequestTest
{
[Test]
public void Ctor()
{
const string method = "POST";
Uri uri = new Uri ("http://xamarin.com");

var ps = new Dictionary<string, string> { { "foo", "bar " } };

var account = new Account ("username");

var request = new Request (method, uri, ps, account);

Assert.That (request.Method, Is.EqualTo (method));
Assert.That (request.Url, Is.EqualTo (uri));

Assert.That (request.Account, Is.SameAs (account));
}
}
}
3 changes: 2 additions & 1 deletion tests/Xamarin.Auth.iOS.Test/Xamarin.Auth.iOS.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ProjectGuid>{FB361F3C-66D3-4B16-9FBF-62C06F7815FD}</ProjectGuid>
<ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>Xamarin.Auth.iOS.Test</RootNamespace>
<RootNamespace>Xamarin.Auth.Test</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>XamarinAuthiOSTest</AssemblyName>
</PropertyGroup>
Expand Down Expand Up @@ -91,6 +91,7 @@
<Compile Include="AppDelegate.cs" />
<Compile Include="OAuth1Test.cs" />
<Compile Include="AccountTest.cs" />
<Compile Include="RequestTest.cs" />
<Compile Include="WebUtilitiesTest.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
Expand Down

0 comments on commit b1a9b6f

Please sign in to comment.