Beispiel #1
0
        public void TestTaskModelSetIdNegative()
        {
            long id = -1;
            var p = new TaskModel() { Id = id };

            Assert.AreEqual(p.Id, id);
        }
Beispiel #2
0
 public void TestConstructTaskModelNullName()
 {
     var p = new TaskModel();
     Assert.IsNull(p.Name);
 }
Beispiel #3
0
 public void TestConstructTaskModelTypeOfTaskModel()
 {
     var p = new TaskModel();
     Assert.IsInstanceOfType(p, typeof(TaskModel));
 }
Beispiel #4
0
 public void TestConstructTaskModelNotNull()
 {
     var p = new TaskModel();
     Assert.IsNotNull(p);
 }
Beispiel #5
0
 public void TestConstructTaskModelNullId()
 {
     var p = new TaskModel();
     Assert.IsNull(p.Id);
 }
Beispiel #6
0
 public void TestConstructTaskModelIdValueRaises()
 {
     var p = new TaskModel();
     var id = p.Id.Value;
 }
Beispiel #7
0
 public void TestConstructTaskModelIdNotHasValue()
 {
     var p = new TaskModel();
     Assert.IsFalse(p.Id.HasValue);
 }
Beispiel #8
0
        public void TestTaskModelToStringWithNullName()
        {
            var p = new TaskModel();
            p.Name = null;

            Assert.AreEqual(p.ToString(), "BrockSolutions.Ticker.Core.Models.Tasks.TaskModel"); //Default representation from base object
        }
Beispiel #9
0
        public void TestTaskModelToStringWithName()
        {
            var name = "Test Name";
            var p = new TaskModel() { Name = name };

            Assert.AreEqual(p.ToString(), name);
        }
Beispiel #10
0
        public void TestTaskModelSetName()
        {
            var name = "Test Name";
            var p = new TaskModel() { Name = name };

            Assert.AreEqual(p.Name, name);
        }