public void TestAccepts()
 {
     var method = new MediaUpload(JsonReader.Parse(SampleInsertMethod) as JsonDictionary);
     Assert.That(method.Accepts, Is.Not.Null);
     Assert.That(method.Accepts.Length, Is.EqualTo(3));
     Assert.That(method.Accepts, Is.EquivalentTo(
         new string[] { "image/*", "video/*", "audio/*" }));
 }
        public void TestProtocols()
        {
            var method = new MediaUpload(JsonReader.Parse(SampleInsertMethod) as JsonDictionary);
            Assert.That(method.Simple, Is.Not.Null);
            Assert.That(method.Simple.MultiPart, Is.True);
            Assert.That(method.Simple.Path, Is.Not.Null);
            Assert.That(method.Simple.Path, Is.EqualTo("/upload/test/v4/resources"));

            Assert.That(method.Resumable, Is.Not.Null);
            Assert.That(method.Resumable.MultiPart, Is.True);
            Assert.That(method.Resumable.Path, Is.Not.Null);
            Assert.That(method.Resumable.Path, Is.EqualTo("/resumable/upload/test/v4/resources"));
        }
 public void TestConstructor()
 {
     var method = new MediaUpload(JsonReader.Parse(SampleInsertMethod) as JsonDictionary);
     Assert.That(method.MaxSize, Is.Not.Null);
     Assert.That(method.MaxSize, Is.EqualTo("10GB"));
 }