//-----------------------------------------------------------------------
//
// Copyright (c) Andrew Arnott. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOAuth.Test.Messaging {
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using DotNetOAuth.Messaging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class DictionaryXmlReaderTests : TestBase {
[TestMethod, ExpectedException(typeof(ArgumentNullException))]
public void CreateWithNullRootElement() {
IComparer fieldSorter = new DataContractMemberComparer(typeof(Mocks.TestMessage));
DictionaryXmlReader.Create(null, fieldSorter, new Dictionary());
}
[TestMethod, ExpectedException(typeof(ArgumentNullException))]
public void CreateWithNullDataContractType() {
DictionaryXmlReader.Create(XName.Get("name", "ns"), null, new Dictionary());
}
[TestMethod, ExpectedException(typeof(ArgumentNullException))]
public void CreateWithNullFields() {
IComparer fieldSorter = new DataContractMemberComparer(typeof(Mocks.TestMessage));
DictionaryXmlReader.Create(XName.Get("name", "ns"), fieldSorter, null);
}
}
}