public void InvalidUseOfSomeImp()
        {
            // Arrange
            var something = new SomeImp();

            // Act & Assert
            Assert.Throws <InvalidOperationException>(() =>
                                                      something.Message = "Ploeh");
        }
Exemplo n.º 2
0
        public void InvalidUseOfSomeImp()
        {
            // Fixture setup
            var something = new SomeImp();

            // Exercise system and verify outcome
            Assert.Throws <InvalidOperationException>(() =>
                                                      something.Message = "Ploeh");
            // Teardown
        }
        public void ValidUseOfSomeImp()
        {
            // Arrange
            var something = new SomeImp();

            // Act
            something.Initialize(new MyClass());
            something.Message = "Ploeh";
            // Assert
            Assert.Equal("Ploeh", something.Message);
        }
Exemplo n.º 4
0
        public void ValidUseOfSomeImp()
        {
            // Fixture setup
            var something = new SomeImp();

            // Exercise system
            something.Initialize(new MyClass());
            something.Message = "Ploeh";
            // Verify outcome
            Assert.Equal("Ploeh", something.Message);
            // Teardown
        }