// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
+using System.Security.Principal;
namespace System.Net {
- public class HttpListenerBasicIdentity {
- internal const string EXCEPTION_MESSAGE = "System.Net.HttpListenerBasicIdentity is not supported on the current platform.";
+ public class HttpListenerBasicIdentity : GenericIdentity {
+ const string EXCEPTION_MESSAGE = "System.Net.HttpListenerBasicIdentity is not supported on the current platform.";
- public HttpListenerBasicIdentity (string username, string password)
+ public HttpListenerBasicIdentity (string username, string password) : base (username, "Basic")
{
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
[ExpectedException (typeof (ArgumentNullException))]
public void Basic1 ()
{
+#if MONOTOUCH_WATCH || __WATCHOS__
+ Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity (null, null);
}
[Test]
public void Basic2 ()
{
+#if MONOTOUCH_WATCH || __WATCHOS__
+ Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("", null);
Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
Assert.AreEqual ("", bi.Name, "#02");
[Test]
public void Basic3 ()
{
+#if MONOTOUCH_WATCH || __WATCHOS__
+ Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", null);
Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
Assert.AreEqual ("hey", bi.Name, "#02");
[Test]
public void Basic4 ()
{
+#if MONOTOUCH_WATCH || __WATCHOS__
+ Assert.Ignore ("HttpListenerBasicIdentity is not supported on watchOS");
+#endif
HttpListenerBasicIdentity bi = new HttpListenerBasicIdentity ("hey", "pass");
Assert.AreEqual ("Basic", bi.AuthenticationType, "#01");
Assert.AreEqual ("hey", bi.Name, "#02");