This repository has been archived by the owner on Jul 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from Hyrules/dev
Dev
- Loading branch information
Showing
47 changed files
with
710 additions
and
1,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.Remoting; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using WinHue3.Philips_Hue; | ||
using WinHue3.Philips_Hue.Communication2; | ||
|
||
namespace WinHueTest.Communication | ||
{ | ||
[TestClass] | ||
public class CommunicationTests | ||
{ | ||
private string baseUri; | ||
private string badbaseUri; | ||
|
||
[TestInitialize] | ||
public void InitTests() | ||
{ | ||
baseUri = "http://192.168.5.30/api/30jodHoH6BvouvzmGR-Y8nJfa0XTN1j8sz2tstYJ/"; | ||
badbaseUri = "http://192.168.5.29/api/30jodHoH6BvouvzmGR-Y8nJfa0XTN1j8sz2tstYJ/"; | ||
HueHttpClient.Timeout = 3000; | ||
} | ||
|
||
|
||
[TestMethod] | ||
public void GetTest() | ||
{ | ||
HttpResult res = HueHttpClient.SendRequest( new Uri(baseUri + "lights"), WebRequestType.Get); | ||
Assert.IsTrue(res.Success); | ||
} | ||
|
||
[TestMethod] | ||
public void GetBadTest() | ||
{ | ||
HttpResult res = HueHttpClient.SendRequest(new Uri(badbaseUri + "lights"), WebRequestType.Get); | ||
Assert.IsFalse(res.Success); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.