コード例 #1
0
 public void ConstantsStoresConstants()
 {
     Constants cons = new Constants();
     int expected = 3;
     cons.Store("a", 3);
     int actual = cons.Retrieve("a");
     Assert.AreEqual(expected, actual);
 }
コード例 #2
0
 public void ConstantsAreCaseInsensitive()
 {
     Constants cons = new Constants();
     int expected = 7;
     cons.Store("A", 7);
     int actual = cons.Retrieve("a");
     Assert.AreEqual(expected, actual);
 }
コード例 #3
0
 public void ConstantsMustBeDefinedForUse()
 {
     Constants cons = new Constants();
     cons.Store("b", 5);
     int actual = cons.Retrieve("a");
 }
コード例 #4
0
 public void ConstantsCannotBeRedefined()
 {
     Constants cons = new Constants();
     cons.Store("a", 3);
     cons.Store("a", 7);
 }
コード例 #5
0
 public void ConstantsCanBeInstantiated()
 {
     Constants cons = new Constants();
     Assert.IsNotNull(cons);
 }