├── VERSION
├── Source
├── SharedKey.snk
├── logo32x32.png
├── logo75x75.png
├── logo500x500.png
├── .nuget
│ ├── packages.config
│ └── NuGet.Config
├── Facebook.IntegrationTests
│ ├── packages.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── GraphInsiteTests.cs
│ ├── Helpers
│ │ └── TestHelpers.cs
│ ├── User.cs
│ ├── TypedObjectTests.cs
│ └── RestReadTests.cs
├── Facebook.Tests
│ ├── Properties
│ │ ├── AppManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── App.xaml
│ ├── packages.config
│ ├── app.config
│ ├── DummyIntegrationTests.cs
│ ├── FacebookUtils
│ │ ├── MultiPartFormPrefixTests.cs
│ │ ├── MultipPartNewLineTests.cs
│ │ ├── UrlEncode
│ │ │ ├── GivenAUrlPartWithWhiteSpacesThen.cs
│ │ │ ├── GivenAStringWithPipleLineSymbolThen.cs
│ │ │ └── GivenAUrlEncodedCodeThen.cs
│ │ ├── UrlDecode
│ │ │ ├── GivenAUrlPartWithPlusSignThen.cs
│ │ │ ├── GivenAUrlWithPipeLineEncodedAsPercent7CThen.cs
│ │ │ └── GivenAUrlEncodedFacebookAccessTokenThen.cs
│ │ ├── ToJsonQueryString
│ │ │ ├── WhenObjectDictionaryIsNotNullAndEmptyThen.cs
│ │ │ ├── WhenStringDictionaryIsNotNullAndEmptyThen.cs
│ │ │ ├── GivenADateTimeWithTimeZoneThen.cs
│ │ │ ├── WhenObjectDictionaryContainsObjectAsListOfStringThen.cs
│ │ │ ├── GivenAFQLQueryThen.cs
│ │ │ ├── GivenAnObjectWithASecondLevelThen.cs
│ │ │ ├── WhenObjectDictionaryHasValuesThen.cs
│ │ │ └── WhenStringDictionaryHasValuesThen.cs
│ │ ├── ToUnixTime
│ │ │ └── GivenADateTimeObjectThen.cs
│ │ ├── FromUnixTime
│ │ │ ├── GivenAUnixTimeInDoubleThen.cs
│ │ │ └── GivenAUnixTimeInStringThen.cs
│ │ ├── IsUsingRestApi
│ │ │ └── GivenDomainMapsAsNull
│ │ │ │ ├── AndRequestUriIsApiUrlThen.cs
│ │ │ │ ├── AndRequestUriIsApiReadThen.cs
│ │ │ │ ├── AndRequestUriIsApiVideoThen.cs
│ │ │ │ └── AndRequestUriIsGraphUrlThen.cs
│ │ ├── FromIso8601FormattedDateTimeTests.cs
│ │ ├── ParseUrlQueryString
│ │ │ ├── GivenAQuerystringAsNullThen.cs
│ │ │ ├── GivenAQuerystringWithCodeThen.cs
│ │ │ ├── GivenAQuerystringAsStringEmptyThen.cs
│ │ │ ├── GivenAQueryStringWithErrorThenDescriptionContainingPlusSignThen.cs
│ │ │ ├── GivenAQuerystringAsWhitespaceThen.cs
│ │ │ ├── GivenAQueryStringWithAcessTokenAndExpiresInThen.cs
│ │ │ └── GivenAValidQuerystringThen.cs
│ │ ├── ParseQueryParametersToDictionary
│ │ │ ├── GivenAPathAsEmptyStringAndEmptyParametersThen.cs
│ │ │ ├── GivenAPathWithoutQuerystringAndEmptyParametersThen.cs
│ │ │ ├── GivenAPathWithQueryStringShouldUrlDecodeCorrectly.cs
│ │ │ ├── GivenAPathStartingWithForwardSlashAndNoQueryStringAndEmptyParametersThen.cs
│ │ │ ├── GivenAPathStartingWithForwardSlashWithQuerystringAndEmptyParametersThen.cs
│ │ │ └── GivenAPathWith2QuerystringsAndEmptyParametersThen.cs
│ │ ├── ConvertToString
│ │ │ ├── GivenANumberOutOfHttpMethodRangeThen.cs
│ │ │ ├── GivenAHttpMethodEnumThen.cs
│ │ │ └── GivenANumberInEnumRangeThen.cs
│ │ ├── DropQueryParametersTests.cs
│ │ └── Merge
│ │ │ ├── WhenBothInputsAreNullThen.cs
│ │ │ ├── WhenBothInputsAreEmptyAndNotNullThen.cs
│ │ │ ├── WhenFirstInputIsNullAndSecondIsEmptyAndNotNullThen.cs
│ │ │ ├── WhenFirstInputIsEmptyAndNotNullAndSecondInputIsNullThen.cs
│ │ │ └── WhenBothTheCombinationOfFirstInputAndSecondInputContainsUniqueKeysThen.cs
│ ├── ExceptionFactory
│ │ ├── GetRestException
│ │ │ ├── GivenInputAsNullThen.cs
│ │ │ ├── GivenAnEmptyDictionaryOfStringObjectThen.cs
│ │ │ ├── GivenANonEmptyDictionaryOfStringObjectThatDoesNotContainErrorCodeKeyThen.cs
│ │ │ ├── GivenNonNullInputNotOfTypeIDictionaryStringObjectThen.cs
│ │ │ ├── GivenAnDictionaryStringObjectWithErrorCodeNotEqualTo190Or4WithMessageRequestLimitReachedThen.cs
│ │ │ ├── GivenADictionaryOfStringObjectThatContainsErrorCodeOnlyThen.cs
│ │ │ ├── GivenADictionaryOfStringObjectWithErrorCode4Then.cs
│ │ │ ├── GivenADictionaryOfStringObjectWithErrorCode190Then.cs
│ │ │ └── GivenADictionaryOfStringObjectWithErrorCodeAsApiEcTooManyCallsThen.cs
│ │ └── GetGraphException
│ │ │ └── Object
│ │ │ ├── GivenInputAsNullThen.cs
│ │ │ ├── GivenAnEmptyDictionaryOfStringObjectThen.cs
│ │ │ ├── GivenANonEmptyDictionaryOfStringObjectThatDoesNotContainErrorKeyThen.cs
│ │ │ └── GivenNonNullInputNotOfTypeIDictionaryStringObjectThen.cs
│ ├── FacebookClient
│ │ ├── GetApiUrl
│ │ │ ├── GivenMethodIsVideoUploadThen.cs
│ │ │ ├── GivenMethodsThanAreNotReadOnlyOrVideoUploadThen.cs
│ │ │ ├── GivenMethodIsNotAllSmallLetterThen.cs
│ │ │ └── Fakes
│ │ │ │ └── FakeFacebookClient.cs
│ │ └── ExtractMediaObject
│ │ │ ├── GivenNullParametersThen.cs
│ │ │ ├── GivenEmptyParametersThen.cs
│ │ │ ├── GiveOneMediaObjectOnlyThen.cs
│ │ │ ├── GivenOneMediaObjectThen.cs
│ │ │ └── GivenMoreThanOneMediaObjectsOnlyThen.cs
│ ├── FacebookClientTests
│ │ └── SerializeJsonTests.cs
│ └── HttpHelperTests.cs
├── packages
│ └── repositories.config
├── Facebook
│ ├── packages.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── HttpMethod.cs
│ ├── HttpWebRequestCreatedEventArgs.cs
│ ├── FacebookClient.Batch.Sync.cs
│ ├── TaskExtensions.cs
│ └── FacebookMediaObject.cs
├── CustomDictionary.xml
├── Settings.StyleCop
├── Facebook-WindowsStore.sln
├── Facebook-Universal-8.1.sln
├── CustomRules.ruleset
├── Facebook-SL5.sln
├── Facebook-WP8.sln
├── Facebook-WP8.1-SL.sln
├── Facebook-WP7.sln
├── Facebook-Net35.sln
├── Facebook-Net45.sln
└── Facebook-Net40.sln
├── clean.cmd
├── Tools
└── xunitcontrib-silverlight.0.2
│ ├── Silverlight3
│ ├── xunit-silverlight3.dll
│ ├── xunit-silverlight3.pdb
│ ├── xunit.extensions-silverlight3.dll
│ ├── xunit.extensions-silverlight3.pdb
│ ├── xunitcontrib.runner.silverlight.toolkit-sl3.dll
│ └── xunitcontrib.runner.silverlight.toolkit-sl3.pdb
│ ├── Silverlight4
│ ├── xunit-silverlight4.dll
│ ├── xunit-silverlight4.pdb
│ ├── xunit.extensions-silverlight4.dll
│ ├── xunit.extensions-silverlight4.pdb
│ ├── xunitcontrib.runner.silverlight.toolkit-sl4.dll
│ └── xunitcontrib.runner.silverlight.toolkit-sl4.pdb
│ ├── WindowsPhone7
│ ├── xunit-silverlight-wp7.dll
│ ├── xunit-silverlight-wp7.pdb
│ ├── xunit.extensions-silverlight-wp7.dll
│ ├── xunit.extensions-silverlight-wp7.pdb
│ ├── xunitcontrib.runner.silverlight.toolkit-wp7.dll
│ └── xunitcontrib.runner.silverlight.toolkit-wp7.pdb
│ ├── MicrosoftSilverlightTesting-04-2010-SL4
│ ├── Microsoft.Silverlight.Testing.dll
│ ├── Microsoft.Silverlight.Testing.pdb
│ ├── Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
│ └── Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.pdb
│ ├── MicrosoftSilverlightTesting-05-2010-SL3
│ ├── Microsoft.Silverlight.Testing.dll
│ ├── Microsoft.Silverlight.Testing.pdb
│ ├── Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
│ └── Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.pdb
│ └── EULA.txt
├── .gitignore
├── doc-config.json
├── .gitattributes
├── NOTICE.txt
├── README.md
└── Build
├── readme.txt
└── NuGet
└── Facebook
└── Facebook.nuspec
/VERSION:
--------------------------------------------------------------------------------
1 | 6.0.10
2 | 7.0.9-beta
3 |
--------------------------------------------------------------------------------
/Source/SharedKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Source/SharedKey.snk
--------------------------------------------------------------------------------
/Source/logo32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Source/logo32x32.png
--------------------------------------------------------------------------------
/Source/logo75x75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Source/logo75x75.png
--------------------------------------------------------------------------------
/Source/logo500x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Source/logo500x500.png
--------------------------------------------------------------------------------
/Source/.nuget/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Source/Facebook.IntegrationTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/clean.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | echo See http://csharpsdk.org/docs/build for information on how to build
4 |
5 | PUSHD "%~dp0"
6 |
7 | jake clean
8 |
9 | :END
10 | POPD
11 |
--------------------------------------------------------------------------------
/Source/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit-silverlight3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit-silverlight3.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit-silverlight3.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit-silverlight3.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit-silverlight4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit-silverlight4.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit-silverlight4.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit-silverlight4.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit-silverlight-wp7.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit-silverlight-wp7.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit-silverlight-wp7.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit-silverlight-wp7.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit.extensions-silverlight3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit.extensions-silverlight3.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit.extensions-silverlight3.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunit.extensions-silverlight3.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit.extensions-silverlight4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit.extensions-silverlight4.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit.extensions-silverlight4.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunit.extensions-silverlight4.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit.extensions-silverlight-wp7.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit.extensions-silverlight-wp7.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit.extensions-silverlight-wp7.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunit.extensions-silverlight-wp7.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunitcontrib.runner.silverlight.toolkit-sl3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunitcontrib.runner.silverlight.toolkit-sl3.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunitcontrib.runner.silverlight.toolkit-sl3.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight3/xunitcontrib.runner.silverlight.toolkit-sl3.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunitcontrib.runner.silverlight.toolkit-sl4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunitcontrib.runner.silverlight.toolkit-sl4.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunitcontrib.runner.silverlight.toolkit-sl4.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/Silverlight4/xunitcontrib.runner.silverlight.toolkit-sl4.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunitcontrib.runner.silverlight.toolkit-wp7.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunitcontrib.runner.silverlight.toolkit-wp7.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunitcontrib.runner.silverlight.toolkit-wp7.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/WindowsPhone7/xunitcontrib.runner.silverlight.toolkit-wp7.pdb
--------------------------------------------------------------------------------
/Source/Facebook.Tests/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.Silverlight.Testing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.Silverlight.Testing.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.Silverlight.Testing.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.Silverlight.Testing.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.Silverlight.Testing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.Silverlight.Testing.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.Silverlight.Testing.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.Silverlight.Testing.pdb
--------------------------------------------------------------------------------
/Source/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Source/Facebook/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-04-2010-SL4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.pdb
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
--------------------------------------------------------------------------------
/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/facebook-csharp-sdk/master/Tools/xunitcontrib-silverlight.0.2/MicrosoftSilverlightTesting-05-2010-SL3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.pdb
--------------------------------------------------------------------------------
/Source/Facebook.Tests/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Source/Facebook/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | // Do not modify this file manually, use jakefile instead.
4 | [assembly: AssemblyTitle("Facebook")]
5 | [assembly: AssemblyDescription("Facebook C# SDK")]
6 | [assembly: AssemblyCompany("The Outercurve Foundation")]
7 | [assembly: AssemblyProduct("Facebook C# SDK")]
8 | [assembly: AssemblyCopyright("Copyright (c) 2011, The Outercurve Foundation.")]
9 | [assembly: ComVisible(false)]
10 | [assembly: AssemblyVersion("6.0.10")]
11 | [assembly: AssemblyFileVersion("7.0.9-beta")]
12 |
--------------------------------------------------------------------------------
/Source/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | facebook
6 | IFrame
7 | Json
8 | Auth
9 | Fql
10 | Mvc
11 | xfbml
12 | fbml
13 | plugin
14 | facepile
15 | unix
16 |
17 |
18 |
19 |
20 | Fql
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Visual Studio Ignores
2 | [Bb]in/
3 | obj/
4 | TestResults/
5 |
6 | *.sln.cache
7 | *.docstates
8 | *.suo
9 | *.user
10 | *.xap
11 | !*StatLight.Client.For.*.xap
12 |
13 | *.ncb
14 |
15 | # Visual Studio Extensions Ignores
16 | .vs10x
17 | *.vs10x
18 |
19 | # Resharper Ignores
20 | _ReSharper.*/
21 | *.resharper.user
22 |
23 | # StyleCop cache ignores
24 | *StyleCop.Cache
25 |
26 | # Ignore TypeMock TestLint Cache
27 | lint.db
28 |
29 | # vim Ignore
30 | *.swp
31 |
32 | # kdiff3 Ignore
33 | *.orig
34 |
35 | # LATEX Ignores
36 | *.tex.undo
37 |
38 | # Misc Ignores
39 | Thumbs.db
40 | !libs/*/[Bb]in/
41 |
42 | #FacebookSDK ignores
43 | Working/
44 | Dist/
45 | packages/
46 | NuGet.exe
47 | doc_output/
48 |
--------------------------------------------------------------------------------
/Source/Settings.StyleCop:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | False
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | False
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/doc-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "projects" : [
3 | {
4 | "path": ".\\Source\\Facebook\\Facebook-Net35.csproj",
5 | "id": ".NET Framework 3.5"
6 | },
7 | {
8 | "path": ".\\Source\\Facebook\\Facebook-Net40.csproj",
9 | "id": ".NET Framework 4.0"
10 | },
11 | {
12 | "path": ".\\Source\\Facebook\\Facebook-Net45.csproj",
13 | "id": ".NET Framework 4.5"
14 | },
15 | {
16 | "path": ".\\Source\\Facebook\\Facebook-SL5.csproj",
17 | "id": "Silverlight 5"
18 | },
19 | {
20 | "path": ".\\Source\\Facebook\\Facebook-WindowsStore.csproj",
21 | "id": ".NET for Windows Store apps"
22 | },
23 | {
24 | "path": ".\\Source\\Facebook\\Facebook-WP7.csproj",
25 | "id": "Windows Phone 7"
26 | },
27 | {
28 | "path": ".\\Source\\Facebook\\Facebook-WP8.csproj",
29 | "id": "Windows Phone 8"
30 | }
31 | ],
32 | "filteredNamespaces": [
33 | "Facebook",
34 | ]
35 | }
--------------------------------------------------------------------------------
/Source/Facebook-WindowsStore.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook-WindowsStore", "Facebook\Facebook-WindowsStore.csproj", "{4D5581CB-93C2-4925-A3A5-E17E5DEF09D9}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {4D5581CB-93C2-4925-A3A5-E17E5DEF09D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {4D5581CB-93C2-4925-A3A5-E17E5DEF09D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {4D5581CB-93C2-4925-A3A5-E17E5DEF09D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {4D5581CB-93C2-4925-A3A5-E17E5DEF09D9}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/Source/Facebook-Universal-8.1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.30324.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook-Universal-8.1", "Facebook\Facebook-Universal-8.1.csproj", "{08B0A0F5-EF42-4A7E-954A-8F7648A322DE}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {08B0A0F5-EF42-4A7E-954A-8F7648A322DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {08B0A0F5-EF42-4A7E-954A-8F7648A322DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {08B0A0F5-EF42-4A7E-954A-8F7648A322DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {08B0A0F5-EF42-4A7E-954A-8F7648A322DE}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.doc diff=astextplain
2 | *.DOC diff=astextplain
3 | *.docx diff=astextplain
4 | *.DOCX diff=astextplain
5 | *.dot diff=astextplain
6 | *.DOT diff=astextplain
7 | *.pdf diff=astextplain
8 | *.PDF diff=astextplain
9 | *.rtf diff=astextplain
10 | *.RTF diff=astextplain
11 |
12 | *.jpg binary
13 | *.png binary
14 | *.gif binary
15 |
16 | *.cs -text diff=csharp
17 | *.vb -text
18 | *.c -text
19 | *.cpp -text
20 | *.cxx -text
21 | *.h -text
22 | *.hxx -text
23 | *.py -text
24 | *.rb -text
25 | *.java -text
26 | *.html -text
27 | *.htm -text
28 | *.css -text
29 | *.scss -text
30 | *.sass -text
31 | *.less -text
32 | *.js -text
33 | *.lisp -text
34 | *.clj -text
35 | *.sql -text
36 | *.php -text
37 | *.lua -text
38 | *.m -text
39 | *.asm -text
40 | *.erl -text
41 | *.fs -text
42 | *.fsx -text
43 | *.hs -text
44 |
45 | *.csproj -text merge=union
46 | *.vbproj -text merge=union
47 | *.fsproj -text merge=union
48 | *.dbproj -text merge=union
49 | *.sln -text eol=crlf merge=union
50 |
51 | .gitattributes -text
52 | *.cmd -text
53 | *.config -text
54 | *.xml -text
55 | Settings.StyleCop -text
56 | VERSION -text
--------------------------------------------------------------------------------
/Source/CustomRules.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Source/Facebook.IntegrationTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | using System.Reflection;
21 |
22 | [assembly: AssemblyTitle("Facebook.IntegrationTests")]
23 |
--------------------------------------------------------------------------------
/Source/Facebook.IntegrationTests/GraphInsiteTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.Graph {
21 |
22 | public class GraphInsiteTests {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | using System.Reflection;
21 | using System.Runtime.CompilerServices;
22 |
23 | [assembly: AssemblyTitle("Facebook.Tests")]
--------------------------------------------------------------------------------
/Source/Facebook-SL5.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook-SL5", "Facebook\Facebook-SL5.csproj", "{857E540C-0092-4590-A279-F98A6B77AC0A}"
5 | EndProject
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{8AAF74FA-9F71-42CA-8216-817F15EDE6E1}"
7 | ProjectSection(SolutionItems) = preProject
8 | .nuget\NuGet.exe = .nuget\NuGet.exe
9 | .nuget\NuGet.targets = .nuget\NuGet.targets
10 | EndProjectSection
11 | EndProject
12 | Global
13 | GlobalSection(TestCaseManagementSettings) = postSolution
14 | CategoryFile = Facebook.vsmdi
15 | EndGlobalSection
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Release|Any CPU = Release|Any CPU
19 | EndGlobalSection
20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
21 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Release|Any CPU.Build.0 = Release|Any CPU
25 | EndGlobalSection
26 | GlobalSection(SolutionProperties) = preSolution
27 | HideSolutionNode = FALSE
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/DummyIntegrationTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebookx.Tests
21 | {
22 | using Xunit;
23 | using global::Facebook;
24 | using System;
25 |
26 | public class DummyIntegrationTests
27 | {
28 | [Fact]
29 | public void Test()
30 | {
31 |
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Source/Facebook-WP8.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook-WP8", "Facebook\Facebook-WP8.csproj", "{857E540C-0092-4590-A279-F98A6B77AC0A}"
5 | EndProject
6 | Global
7 | GlobalSection(TestCaseManagementSettings) = postSolution
8 | CategoryFile = Facebook.vsmdi
9 | EndGlobalSection
10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
11 | Debug|Any CPU = Debug|Any CPU
12 | Debug|x86 = Debug|x86
13 | Release|Any CPU = Release|Any CPU
14 | Release|x86 = Release|x86
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
19 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Debug|x86.ActiveCfg = Debug|x86
20 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Debug|x86.Build.0 = Debug|x86
21 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Release|Any CPU.Build.0 = Release|Any CPU
23 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Release|x86.ActiveCfg = Release|x86
24 | {857E540C-0092-4590-A279-F98A6B77AC0A}.Release|x86.Build.0 = Release|x86
25 | EndGlobalSection
26 | GlobalSection(SolutionProperties) = preSolution
27 | HideSolutionNode = FALSE
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/MultiPartFormPrefixTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class MultiPartFormPrefixTests
26 | {
27 | [Fact]
28 | public void EqualsDoubleDash()
29 | {
30 | var result = FacebookUtils.MultiPartFormPrefix;
31 |
32 | Assert.Equal("--", result);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/MultipPartNewLineTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class MultipPartNewLineTests
26 | {
27 | [Fact]
28 | public void EqualsSlashRSlashN()
29 | {
30 | var result = FacebookUtils.MultiPartNewLine;
31 |
32 | Assert.Equal("\r\n", result);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/NOTICE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011, The Outercurve Foundation.
2 | This software is released under the Apache License 2.0 (the "License");
3 | you may not use the software except in compliance with the License. You
4 | can find a copy of the License in the file LICENSE.TXT accompanying this
5 | file.
6 |
7 | Additional Libraries:
8 | This software includes or is derivative of works distributed under the
9 | licenses listed below. The full text for most of the licenses listed below
10 | can be found in the LICENSE.txt file accompanying each work. The original
11 | copyright notices have been preserved within the respective files and or
12 | packages. Please refer to the specific files and/or packages for more
13 | detailed information about the authors, copyright notices, and licenses.
14 |
15 |
16 | njake
17 | -----------------
18 | Website: https://github.com/prabirshrestha/njake
19 | Copyright: N/A
20 | License: Apache 2.0 License
21 |
22 |
23 | xUnit.net
24 | -----------------
25 | Website: http://xunit.codeplex.com
26 | Copyright: N/A
27 | License: Microsoft Public License (Ms-PL)
28 |
29 |
30 | xUnit.net Contrib
31 | -----------------
32 | Website: http://xunitcontrib.codeplex.com
33 | Copyright: N/A
34 | License: Microsoft Public License (Ms-PL)
35 |
36 |
37 | SimpleJson
38 | -----------------
39 | Website: https://github.com/facebook-csharp-sdk/simple-json
40 | Copyright: N/A
41 | License: MIT License
42 |
43 |
44 | Additional Notices:
45 | The software was originally conceived and created by Nathan Totten,
46 | Prabir Shersha, and Jim Zimmerman.
47 |
48 | Other contributors to the project include:
49 | N/A
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetRestException/GivenInputAsNullThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetRestException
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenInputAsNullThen
26 | {
27 | [Fact]
28 | public void ResultIsNull()
29 | {
30 | object input = null;
31 |
32 | var result = ExceptionFactory.GetRestException(input);
33 |
34 | Assert.Null(result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.IntegrationTests/Helpers/TestHelpers.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook
21 | {
22 | using System;
23 | using System.IO;
24 | using System.Reflection;
25 |
26 | public class TestHelpers
27 | {
28 | public static string GetPathRelativeToExecutable(string fileName)
29 | {
30 | string executable = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath;
31 | return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(executable), fileName));
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetGraphException/Object/GivenInputAsNullThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetGraphException.Object
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenInputAsNullThen
26 | {
27 | [Fact]
28 | public void ResultIsNull()
29 | {
30 | object input = null;
31 |
32 | var result = ExceptionFactory.GetGraphException(input);
33 |
34 | Assert.Null(result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook/HttpMethod.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook
21 | {
22 | ///
23 | /// Represents an HTTP request type.
24 | ///
25 | public enum HttpMethod
26 | {
27 | ///
28 | /// A GET Request
29 | ///
30 | Get,
31 |
32 | ///
33 | /// A POST Request
34 | ///
35 | Post,
36 |
37 | ///
38 | /// A DELETE Request
39 | ///
40 | Delete,
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/UrlEncode/GivenAUrlPartWithWhiteSpacesThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.UrlEncode
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAUrlPartWithWhiteSpacesThen
26 | {
27 | [Fact]
28 | public void WhiteSpacesShouldBeConvertedToPlusSign()
29 | {
30 | var urlPart = "hello world";
31 |
32 | var result = FluentHttp.HttpHelper.UrlEncode(urlPart);
33 |
34 | Assert.Equal("hello%20world", result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/UrlDecode/GivenAUrlPartWithPlusSignThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.UrlDecode
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAUrlPartWithPlusSignThen
26 | {
27 | [Fact]
28 | public void PlusSignShouldBeConvertedToWhitespace()
29 | {
30 | var urlPart = "The+user+denied+your+request.";
31 |
32 | var result = FluentHttp.HttpHelper.UrlDecode(urlPart);
33 |
34 | Assert.Equal("The user denied your request.", result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetRestException/GivenAnEmptyDictionaryOfStringObjectThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetRestException
21 | {
22 | using System.Collections.Generic;
23 | using Xunit;
24 |
25 | public class GivenAnEmptyDictionaryOfStringObjectThen
26 | {
27 | [Fact]
28 | public void ResultIsNull()
29 | {
30 | var dict = new Dictionary();
31 |
32 | var result = Facebook.ExceptionFactory.GetRestException(dict);
33 |
34 | Assert.Null(result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetGraphException/Object/GivenAnEmptyDictionaryOfStringObjectThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetGraphException.Object
21 | {
22 | using System.Collections.Generic;
23 | using Xunit;
24 |
25 | public class GivenAnEmptyDictionaryOfStringObjectThen
26 | {
27 | [Fact]
28 | public void ResultIsNull()
29 | {
30 | var dict = new Dictionary();
31 |
32 | var result = Facebook.ExceptionFactory.GetRestException(dict);
33 |
34 | Assert.Null(result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookClient/GetApiUrl/GivenMethodIsVideoUploadThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookClient.GetApiUrl
21 | {
22 | using Tests.FacebookClient.GetApiUrl.Fakes;
23 | using Xunit;
24 |
25 | public class GivenMethodIsVideoUploadThen
26 | {
27 | [Fact]
28 | public void TheUriShouldStartWithApiVideoFacebookDomain()
29 | {
30 | var fb = new FakeFacebookClient();
31 |
32 | var uri = fb.GetApiUrl("video.upload");
33 |
34 | Assert.Equal("https://api-video.facebook.com/restserver.php", uri.AbsoluteUri);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ToJsonQueryString/WhenObjectDictionaryIsNotNullAndEmptyThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ToJsonQueryString
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class WhenObjectDictionaryIsNotNullAndEmptyThen
27 | {
28 | [Fact]
29 | public void ResultShouldBeEmptyString()
30 | {
31 | var dict = new Dictionary();
32 |
33 | var result = FacebookUtils.ToJsonQueryString(dict);
34 |
35 | Assert.Equal(string.Empty, result);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ToJsonQueryString/WhenStringDictionaryIsNotNullAndEmptyThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ToJsonQueryString
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class WhenStringDictionaryIsNotNullAndEmptyThen
27 | {
28 | [Fact]
29 | public void ResultShouldBeEmptyString()
30 | {
31 | var dict = new Dictionary();
32 |
33 | var result = FacebookUtils.ToJsonQueryString(dict);
34 |
35 | Assert.Equal(string.Empty, result);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ToUnixTime/GivenADateTimeObjectThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ToUnixTime
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenADateTimeObjectThen
27 | {
28 | [Fact]
29 | public void ReturnsUnixTimeEquivalent()
30 | {
31 | DateTimeOffset dateTime = new DateTimeOffset(2010, 9, 16, 0, 0, 0, TimeSpan.FromHours(-7));
32 | var expected = 1284620400;
33 |
34 | var actual = DateTimeConvertor.ToUnixTime(dateTime);
35 |
36 | Assert.Equal(expected, actual);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/UrlEncode/GivenAStringWithPipleLineSymbolThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.UrlEncode
21 | {
22 | using Facebook;
23 | using Xunit;
24 | using Xunit.Extensions;
25 |
26 | public class GivenAStringWithPipleLineSymbolThen
27 | {
28 | [InlineData("%7C", "|")]
29 | [InlineData("3702%7C2", "3702|2")]
30 | [Theory]
31 | public void ItShouldEncodePipleAsPercent7C(string expectedUrl, string strToEncode)
32 | {
33 | var result = FluentHttp.HttpHelper.UrlEncode(strToEncode);
34 |
35 | Assert.Equal(expectedUrl, result);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/FromUnixTime/GivenAUnixTimeInDoubleThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.FromUnixTime
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenAUnixTimeInDoubleThen
27 | {
28 | [Fact]
29 | public void ReturnsDateTimeEquivalent()
30 | {
31 | var unixTimeinDouble = 1284620400;
32 | var expected = new DateTimeOffset(2010, 9, 16, 0, 0, 0, TimeSpan.FromHours(-7));
33 |
34 | var actual = DateTimeConvertor.FromUnixTime(unixTimeinDouble);
35 |
36 | Assert.Equal(expected, actual);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/FromUnixTime/GivenAUnixTimeInStringThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.FromUnixTime
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenAUnixTimeInStringThen
27 | {
28 | [Fact]
29 | public void ReturnsDateTimeEquivalent()
30 | {
31 | var unixTimeInString = "1284620400";
32 | var expected = new DateTimeOffset(2010, 9, 16, 0, 0, 0, TimeSpan.FromHours(-7));
33 |
34 | var actual = DateTimeConvertor.FromUnixTime(unixTimeInString);
35 |
36 | Assert.Equal(expected, actual);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/IsUsingRestApi/GivenDomainMapsAsNull/AndRequestUriIsApiUrlThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.IsUsingRestApi.GivenDomainMapsAsNull
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 | using Xunit.Extensions;
26 |
27 | public class AndRequestUriIsApiUrlThen
28 | {
29 | [Theory]
30 | [InlineData("https://api.facebook.com")]
31 | public void ResultIsTrue(string url)
32 | {
33 | var uri = new Uri(url);
34 |
35 | var result = FacebookUtils.IsUsingRestApi(null, uri);
36 |
37 | Assert.True(result);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/UrlDecode/GivenAUrlWithPipeLineEncodedAsPercent7CThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.UrlDecode
21 | {
22 | using Facebook;
23 | using Xunit;
24 | using Xunit.Extensions;
25 |
26 | public class GivenAUrlWithPipeLineEncodedAsPercent7CThen
27 | {
28 | [InlineData("%7C", "|")]
29 | [InlineData("3702%7C2", "3702|2")]
30 | [Theory]
31 | public void ItShouldBeConvertedToPipeLineSymbol(string encodedUrl, string expected)
32 | {
33 | var result = FluentHttp.HttpHelper.UrlDecode(encodedUrl);
34 |
35 | Assert.Equal(expected, result);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/IsUsingRestApi/GivenDomainMapsAsNull/AndRequestUriIsApiReadThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.IsUsingRestApi.GivenDomainMapsAsNull
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 | using Xunit.Extensions;
26 |
27 | public class AndRequestUriIsApiReadThen
28 | {
29 | [Theory]
30 | [InlineData("https://api-read.facebook.com")]
31 | public void ResultIsTrue(string url)
32 | {
33 | var uri = new Uri(url);
34 |
35 | var result = FacebookUtils.IsUsingRestApi(null, uri);
36 |
37 | Assert.True(result);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/IsUsingRestApi/GivenDomainMapsAsNull/AndRequestUriIsApiVideoThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.IsUsingRestApi.GivenDomainMapsAsNull
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 | using Xunit.Extensions;
26 |
27 | public class AndRequestUriIsApiVideoThen
28 | {
29 | [Theory]
30 | [InlineData("https://api-video.facebook.com")]
31 | public void ResultIsTrue(string url)
32 | {
33 | var uri = new Uri(url);
34 |
35 | var result = FacebookUtils.IsUsingRestApi(null, uri);
36 |
37 | Assert.True(result);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Source/Facebook.IntegrationTests/User.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | using System;
21 | using System.Collections.Generic;
22 | using System.Linq;
23 | using System.Text;
24 | using System.Runtime.Serialization;
25 |
26 | namespace Facebook.Graph
27 | {
28 | [DataContract]
29 | public class User
30 | {
31 |
32 | [DataMember(Name = "id")]
33 | public long Id { get; set; }
34 |
35 | [DataMember(Name = "first_name")]
36 | public string FirstName { get; set; }
37 |
38 | [DataMember(Name = "last_name")]
39 | public string LastName { get; set; }
40 |
41 | [DataMember(Name = "email")]
42 | public string Email { get; set; }
43 |
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookClientTests/SerializeJsonTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookClient
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class SerializeJsonTests
27 | {
28 | [Fact]
29 | public void SerializeBigNumbersCorrectly()
30 | {
31 | var parameters = new Dictionary();
32 | parameters["object_id"] = 10150098461530576;
33 |
34 | var fb = new FacebookClient();
35 | string json = fb.SerializeJson(parameters);
36 |
37 | Assert.Equal("{\"object_id\":10150098461530576}", json);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Source/Facebook-WP8.1-SL.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.30324.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook-WP8.1-SL", "Facebook\Facebook-WP8.1-SL.csproj", "{857E540C-0092-4590-A279-F98A6B77ACAB}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|ARM = Debug|ARM
12 | Debug|x86 = Debug|x86
13 | Release|Any CPU = Release|Any CPU
14 | Release|ARM = Release|ARM
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Debug|ARM.ActiveCfg = Debug|ARM
21 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Debug|ARM.Build.0 = Debug|ARM
22 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Debug|x86.ActiveCfg = Debug|x86
23 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Debug|x86.Build.0 = Debug|x86
24 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Release|ARM.ActiveCfg = Release|ARM
27 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Release|ARM.Build.0 = Release|ARM
28 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Release|x86.ActiveCfg = Release|x86
29 | {857E540C-0092-4590-A279-F98A6B77ACAB}.Release|x86.Build.0 = Release|x86
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/FromIso8601FormattedDateTimeTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils
21 | {
22 | using System;
23 | using Xunit;
24 |
25 | public class FromIso8601FormattedDateTimeTests
26 | {
27 | [Fact]
28 | public void GivenNullThrowsArgumentNullException()
29 | {
30 | Assert.Throws(() => DateTimeConvertor.FromIso8601FormattedDateTime(null));
31 | }
32 |
33 | [Fact]
34 | public void GivenEmptyThrowsArgumnetNullException()
35 | {
36 | Assert.Throws(() => DateTimeConvertor.FromIso8601FormattedDateTime(string.Empty));
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseUrlQueryString/GivenAQuerystringAsNullThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseUrlQueryString
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAQuerystringAsNullThen
26 | {
27 | [Fact]
28 | public void TheResultShouldNotBeNull()
29 | {
30 | var result = FacebookUtils.ParseUrlQueryString(null);
31 |
32 | Assert.NotNull(result);
33 | }
34 |
35 | [Fact]
36 | public void TheCountOfResultShouldBe0()
37 | {
38 | var result = FacebookUtils.ParseUrlQueryString(null);
39 |
40 | Assert.Equal(0, result.Count);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookClient/GetApiUrl/GivenMethodsThanAreNotReadOnlyOrVideoUploadThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookClient.GetApiUrl
21 | {
22 | using Tests.FacebookClient.GetApiUrl.Fakes;
23 | using Xunit;
24 | using Xunit.Extensions;
25 |
26 | public class GivenMethodsThanAreNotReadOnlyOrVideoUploadThen
27 | {
28 | [InlineData("admin.banUsers")]
29 | [Theory]
30 | public void TheUriShouldStartWithApiFacebookDomain(string method)
31 | {
32 | var fb = new FakeFacebookClient();
33 |
34 | var uri = fb.GetApiUrl(method);
35 |
36 | Assert.Equal("https://api.facebook.com/restserver.php", uri.AbsoluteUri);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseUrlQueryString/GivenAQuerystringWithCodeThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseUrlQueryString
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAQuerystringWithCodeThen
26 | {
27 | [Fact]
28 | public void ItShouldDecodeCorrectly()
29 | {
30 | var queryString = "code=2.XeyH7lWz33itx1R86_uBeg__.3600.1294930800-100001327642026%7Ct8SsfSR2XI6yhBAkhX95J7p9hJ0";
31 |
32 | var result = FacebookUtils.ParseUrlQueryString(queryString);
33 |
34 | Assert.Equal("2.XeyH7lWz33itx1R86_uBeg__.3600.1294930800-100001327642026|t8SsfSR2XI6yhBAkhX95J7p9hJ0", result["code"]);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseQueryParametersToDictionary/GivenAPathAsEmptyStringAndEmptyParametersThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseQueryParametersToDictionary
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenAPathAsEmptyStringAndEmptyParametersThen
27 | {
28 | [Fact]
29 | public void CountOfParametersEquals0()
30 | {
31 | string path = string.Empty;
32 | var parameters = new Dictionary();
33 |
34 | FacebookUtils.ParseQueryParametersToDictionary(path, parameters);
35 |
36 | Assert.Equal(0, parameters.Count);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ConvertToString/GivenANumberOutOfHttpMethodRangeThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ConvertToString
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 | using Xunit.Extensions;
26 |
27 | public class GivenANumberOutOfHttpMethodRangeThen
28 | {
29 | [InlineData(-1)]
30 | [InlineData(3)]
31 | [InlineData(4)]
32 | [Theory]
33 | public void ItShouldThrowInvalidOperationException(int number)
34 | {
35 | var httpMethod = (HttpMethod)number;
36 |
37 | Assert.Throws(
38 | () => FacebookUtils.ConvertToString(httpMethod));
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseQueryParametersToDictionary/GivenAPathWithoutQuerystringAndEmptyParametersThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseQueryParametersToDictionary
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenAPathWithoutQuerystringAndEmptyParametersThen
27 | {
28 | [Fact]
29 | public void CountOfParametersEquals0()
30 | {
31 | var path = "/me/likes";
32 | var parameters = new Dictionary();
33 |
34 | FacebookUtils.ParseQueryParametersToDictionary(path, parameters);
35 |
36 | Assert.Equal(0, parameters.Count);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetRestException/GivenANonEmptyDictionaryOfStringObjectThatDoesNotContainErrorCodeKeyThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetRestException
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenANonEmptyDictionaryOfStringObjectThatDoesNotContainErrorCodeKeyThen
27 | {
28 | [Fact]
29 | public void ResultIsNull()
30 | {
31 | var dictWithoutErrorCodeKey = new Dictionary { { "dummy_key", "dummy_value" } };
32 |
33 | var result = ExceptionFactory.GetRestException(dictWithoutErrorCodeKey);
34 |
35 | Assert.Null(result);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/Facebook.IntegrationTests/TypedObjectTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests
21 | {
22 | using Facebook.Graph;
23 | using Xunit;
24 |
25 | public class TypedObjectTests
26 | {
27 | private FacebookClient app;
28 | public TypedObjectTests()
29 | {
30 | app = new FacebookClient();
31 | //app.Session = new FacebookSession
32 | //{
33 | // AccessToken = ConfigurationManager.AppSettings["AccessToken"],
34 | //};
35 | }
36 |
37 | [Fact]
38 | public void Get_User_Info_Typed()
39 | {
40 | var user = app.Get("/totten");
41 | Assert.NotNull(user.FirstName);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/IsUsingRestApi/GivenDomainMapsAsNull/AndRequestUriIsGraphUrlThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.IsUsingRestApi.GivenDomainMapsAsNull
21 | {
22 | using System;
23 | using Facebook;
24 | using Xunit;
25 | using Xunit.Extensions;
26 |
27 | public class AndRequestUriIsGraphUrlThen
28 | {
29 | [Theory]
30 | [InlineData("https://graph.facebook.com/me")]
31 | [InlineData("https://graph.beta.facebook.com/me")]
32 | public void ResultIsFalse(string url)
33 | {
34 | var uri = new Uri(url);
35 |
36 | var result = FacebookUtils.IsUsingRestApi(null, uri);
37 |
38 | Assert.False(result);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetGraphException/Object/GivenANonEmptyDictionaryOfStringObjectThatDoesNotContainErrorKeyThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetGraphException.Object
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 |
26 | public class GivenANonEmptyDictionaryOfStringObjectThatDoesNotContainErrorKeyThen
27 | {
28 | [Fact]
29 | public void ResultIsNotNull()
30 | {
31 | var dictWithoutErrorCodeKey = new Dictionary { { "dummy_key", "dummy_value" } };
32 |
33 | var result = ExceptionFactory.GetGraphException(dictWithoutErrorCodeKey);
34 |
35 | Assert.Null(result);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseUrlQueryString/GivenAQuerystringAsStringEmptyThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseUrlQueryString
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAQuerystringAsStringEmptyThen
26 | {
27 | [Fact]
28 | public void TheResultShouldNotBeNull()
29 | {
30 | var result = FacebookUtils.ParseUrlQueryString(string.Empty);
31 |
32 | Assert.NotNull(result);
33 | }
34 |
35 | [Fact]
36 | public void TheCountOfResultShouldBe0()
37 | {
38 | var result = FacebookUtils.ParseUrlQueryString(string.Empty);
39 |
40 | Assert.Equal(0, result.Count);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/UrlEncode/GivenAUrlEncodedCodeThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.UrlEncode
21 | {
22 | using Facebook;
23 | using Xunit;
24 | using Xunit.Extensions;
25 |
26 | public class GivenAUrlEncodedCodeThen
27 | {
28 | [InlineData("2.XeyH7lWz33itx1R86_uBeg__.3600.1294930800-100001327642026%7Ct8SsfSR2XI6yhBAkhX95J7p9hJ0", "2.XeyH7lWz33itx1R86_uBeg__.3600.1294930800-100001327642026|t8SsfSR2XI6yhBAkhX95J7p9hJ0")]
29 | [Theory]
30 | public void ItShouldDecodeCorrectly(string encodedCode, string expectedCode)
31 | {
32 | var result = FluentHttp.HttpHelper.UrlDecode(encodedCode);
33 |
34 | Assert.Equal(expectedCode, result);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseUrlQueryString/GivenAQueryStringWithErrorThenDescriptionContainingPlusSignThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseUrlQueryString
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAQueryStringWithErrorThenDescriptionContainingPlusSignThen
26 | {
27 | [Fact]
28 | public void Error_descriptionShouldBeDecodedCorrectly()
29 | {
30 | var queryString = "error_reason=user_denied&error=access_denied&error_description=The+user+denied+your+request.";
31 |
32 | var result = FacebookUtils.ParseUrlQueryString(queryString);
33 |
34 | Assert.Equal("The user denied your request.", result["error_description"]);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Source/Facebook/HttpWebRequestCreatedEventArgs.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook
21 | {
22 | using System;
23 |
24 | class HttpWebRequestCreatedEventArgs : EventArgs
25 | {
26 | private readonly object _userToken;
27 | private readonly HttpWebRequestWrapper _httpWebRequestWrapper;
28 |
29 | public HttpWebRequestCreatedEventArgs(object userToken, HttpWebRequestWrapper httpWebRequestWrapper)
30 | {
31 | _userToken = userToken;
32 | _httpWebRequestWrapper = httpWebRequestWrapper;
33 | }
34 |
35 | public HttpWebRequestWrapper HttpWebRequest
36 | {
37 | get { return _httpWebRequestWrapper; }
38 | }
39 |
40 | public object UserState
41 | {
42 | get { return _userToken; }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/ParseUrlQueryString/GivenAQuerystringAsWhitespaceThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils.ParseUrlQueryString
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class GivenAQuerystringAsWhitespaceThen
26 | {
27 | [Fact]
28 | public void ResultShouldNotBeNull()
29 | {
30 | string whiteSpaceQueryString = " ";
31 | var result = FacebookUtils.ParseUrlQueryString(whiteSpaceQueryString);
32 |
33 | Assert.NotNull(result);
34 | }
35 |
36 | [Fact]
37 | public void TheCountOfResultShouldBe0()
38 | {
39 | string whiteSpaceQueryString = " ";
40 | var result = FacebookUtils.ParseUrlQueryString(whiteSpaceQueryString);
41 |
42 | Assert.Equal(0, result.Count);
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookUtils/DropQueryParametersTests.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookUtils
21 | {
22 | using Facebook;
23 | using Xunit;
24 |
25 | public class DropQueryParametersTests
26 | {
27 | [Fact]
28 | public void CountIs2()
29 | {
30 | var result = FacebookUtils.DropQueryParameters.Count;
31 |
32 | Assert.Equal(2, result);
33 | }
34 |
35 | [Fact]
36 | public void ContainsSession()
37 | {
38 | var result = FacebookUtils.DropQueryParameters.Contains("session");
39 |
40 | Assert.True(result);
41 | }
42 |
43 | [Fact]
44 | public void ContainsSignedRequest()
45 | {
46 | var result = FacebookUtils.DropQueryParameters.Contains("signed_request");
47 |
48 | Assert.True(result);
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookClient/GetApiUrl/GivenMethodIsNotAllSmallLetterThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.FacebookClient.GetApiUrl
21 | {
22 | using Tests.FacebookClient.GetApiUrl.Fakes;
23 | using Xunit;
24 |
25 | public class GivenMethodIsNotAllSmallLetterThen
26 | {
27 | [Fact]
28 | public void VideoUploadTests()
29 | {
30 | var fb = new FakeFacebookClient();
31 |
32 | var uri = fb.GetApiUrl("video.Upload");
33 |
34 | Assert.Equal("https://api-video.facebook.com/restserver.php", uri.AbsoluteUri);
35 | }
36 |
37 | [Fact]
38 | public void ReadOnlyApiCalls()
39 | {
40 | var fb = new FakeFacebookClient();
41 |
42 | var uri = fb.GetApiUrl("users.GetStandardinfo");
43 |
44 | Assert.Equal("https://api-read.facebook.com/restserver.php", uri.AbsoluteUri);
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/FacebookClient/ExtractMediaObject/GivenNullParametersThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | using System.Collections.Generic;
21 | using Xunit;
22 |
23 | namespace Facebook.Tests.FacebookClient.ExtractMediaObject
24 | {
25 | using Facebook;
26 |
27 | public class GivenNullParametersThen
28 | {
29 | private IDictionary _parameters;
30 |
31 | public GivenNullParametersThen()
32 | {
33 | _parameters = null;
34 | }
35 |
36 | [Fact]
37 | public void ReturnValueIsNotNull()
38 | {
39 | var result = FacebookClient.ExtractMediaObjects(_parameters);
40 |
41 | Assert.NotNull(result);
42 | }
43 |
44 | [Fact]
45 | public void CountIs0()
46 | {
47 | var result = FacebookClient.ExtractMediaObjects(_parameters);
48 |
49 | Assert.Equal(0, result.Count);
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/Source/Facebook.Tests/ExceptionFactory/GetRestException/GivenNonNullInputNotOfTypeIDictionaryStringObjectThen.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2011, The Outercurve Foundation.
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 | // Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)
17 | // https://github.com/facebook-csharp-sdk/facbook-csharp-sdk
18 | //-----------------------------------------------------------------------
19 |
20 | namespace Facebook.Tests.ExceptionFactory.GetRestException
21 | {
22 | using System.Collections.Generic;
23 | using Facebook;
24 | using Xunit;
25 | using Xunit.Extensions;
26 |
27 | public class GivenNonNullInputNotOfTypeIDictionaryStringObjectThen
28 | {
29 | [Theory]
30 | [PropertyData("TestData")]
31 | public void ResultIsNull(object input)
32 | {
33 | var result = ExceptionFactory.GetRestException(input);
34 |
35 | Assert.Null(result);
36 | }
37 |
38 | public static IEnumerable