コード例 #1
0
            public void MapsCreateSuiteModelWithoutCategories()
            {
                var createSuiteModel = new CreateSuiteModel
                {
                    SuiteName = "suite 1"
                };

                var zigNetApiMapper = new ZigNetApiMapper();
                var suite           = zigNetApiMapper.MapCreateSuiteModel(createSuiteModel);

                Assert.AreEqual("suite 1", suite.Name);
                Assert.AreEqual(0, suite.Categories.Count);
            }
コード例 #2
0
            public void MapsCreateSuiteModelWhenCategoriesIsEmptyList()
            {
                var createSuiteModel = new CreateSuiteModel
                {
                    SuiteName       = "suite 1",
                    SuiteCategories = new string[0]
                };

                var zigNetApiMapper = new ZigNetApiMapper();
                var suite           = zigNetApiMapper.MapCreateSuiteModel(createSuiteModel);

                Assert.AreEqual("suite 1", suite.Name);
                Assert.AreEqual(0, suite.Categories.ToList().Count);
            }
コード例 #3
0
            public void MapsCreateSuiteModelWithCategories()
            {
                var createSuiteModel = new CreateSuiteModel
                {
                    SuiteName       = "suite 1",
                    SuiteCategories = new string[] { "suite category 1", "suite category 2" }
                };

                var zigNetApiMapper = new ZigNetApiMapper();
                var suite           = zigNetApiMapper.MapCreateSuiteModel(createSuiteModel);

                Assert.AreEqual("suite 1", suite.Name);
                Assert.AreEqual("suite category 1", suite.Categories.ToList()[0].Name);
                Assert.AreEqual("suite category 2", suite.Categories.ToList()[1].Name);
            }