-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTaxonomyImportModelTest.cs
More file actions
32 lines (29 loc) · 1.02 KB
/
TaxonomyImportModelTest.cs
File metadata and controls
32 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.IO;
using Contentstack.Management.Core.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Contentstack.Management.Core.Unit.Tests.Models
{
[TestClass]
public class TaxonomyImportModelTest
{
[TestMethod]
public void Throws_When_FilePath_Is_Null()
{
var ex = Assert.ThrowsException<ArgumentNullException>(() => new TaxonomyImportModel((string)null));
Assert.AreEqual("filePath", ex.ParamName);
}
[TestMethod]
public void Throws_When_FilePath_Is_Empty()
{
var ex = Assert.ThrowsException<ArgumentNullException>(() => new TaxonomyImportModel(""));
Assert.AreEqual("filePath", ex.ParamName);
}
[TestMethod]
public void Throws_When_Stream_Is_Null()
{
var ex = Assert.ThrowsException<ArgumentNullException>(() => new TaxonomyImportModel((Stream)null, "taxonomy.json"));
Assert.AreEqual("stream", ex.ParamName);
}
}
}