예제 #1
0
 public void OperatorTest()
 {
     Assert.True(ExampleSafeEnum.GetById(1) == ExampleSafeEnum.GetById(1));
     Assert.True(ExampleSafeEnum.GetById(1) != ExampleSafeEnum.GetById(2));
     Assert.True(ExampleSafeEnum.GetById(1).Equals(ExampleSafeEnum.GetById(1)));
     Assert.False(ExampleSafeEnum.GetById(1).Equals(ExampleSafeEnum.GetById(2)));
 }
예제 #2
0
 public void GetAllTest()
 {
     Assert.Equal(2, ExampleSafeEnum.GetAll().Count());
     Assert.IsType <ExampleSafeEnum>(ExampleSafeEnum.GetAll().First());
 }
예제 #3
0
 public void GetByIdTest()
 => Assert.Equal(1, ExampleSafeEnum.GetById(1).Id);