All pastes #2132817 Raw Edit

Mine

public text v1 · immutable
#2132817 ·published 2012-03-27 14:55 UTC
rendered paste body
/// <summary>
    /// TODO: Update summary.
    /// </summary>
    [TestFixture]
    public class CategoryTests
    {
        private Category testCategory;
        private readonly static int CategoryId = 3;
        private readonly static string Name = "Sport";

        [SetUp]
        public void SetUp()
        {
            this.testCategory = new Category();
        }

        [Test]
        public void NameDefaultsToEmpty()
        {
            Assert.AreEqual(string.Empty, this.testCategory.Name);
        }

        [Test]
        public void CategoryIdDefaultsToZero()
        {
            Assert.AreEqual(0, this.testCategory.CategoryId);
        }

        [Test]
        public void NameIsSet()
        {
            this.testCategory.Name = Name;
            Assert.AreEqual(this.testCategory.Name, Name);
        }

        [Test]
        public void CategoryIdIsSet()
        {
            this.testCategory.CategoryId = CategoryId;
            Assert.AreEqual(this.testCategory.CategoryId, CategoryId);
        }
    }