예제 #1
0
        public void ChangeState_Invalid_State()
        {
            var ebatchSheet = new EbatchSheetEntity.EbatchSheet()
            {
                CurrentState = EbatchState.ProductionReview
            };

            var stateToChange = new EbatchState(10, "InvalidValue");

            Assert.Throws <ArgumentException>(() => ebatchSheet.ChangeState(stateToChange));
        }
예제 #2
0
        public void ChangeState_Valid_State()
        {
            var ebatchSheet = new EbatchSheetEntity.EbatchSheet()
            {
                CurrentState = EbatchState.ProductionReview
            };

            ebatchSheet.ChangeState(EbatchState.Completed);

            var expectState = EbatchState.Completed;

            Assert.True(expectState.Equals(ebatchSheet.CurrentState));
        }