public void ReferenceViewModel_Returns_ValidViewModel_NoId()
        {
            var model = new ResourceReference
            {
                Reference = "reference/"
            };

            var viewModel = model.ToViewModel();

            Assert.NotNull(viewModel);

            Assert.Equal(string.Empty, viewModel.Id);
            Assert.Equal("reference/", viewModel.Reference);
        }
        public void ReferenceViewModel_Returns_ValidViewModel_NoSlash()
        {
            var model = new ResourceReference
            {
                Reference = "reference-abc"
            };

            var viewModel = model.ToViewModel();

            Assert.NotNull(viewModel);

            Assert.Equal("reference-abc", viewModel.Id);
            Assert.Equal("reference-abc", viewModel.Reference);
        }
        public void ReferenceViewModel_Returns_InvalidViewModel_Null()
        {
            ResourceReference model = null;

            Assert.Throws <NullReferenceException>(() => model.ToViewModel());
        }