Beispiel #1
0
        public void DeleteIDProof()
        {
            // Arrange
            IDProofController controller = new IDProofController();

            var actResult = controller.Delete(1);
            // Act
            var result = actResult as OkNegotiatedContentResult <bool>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content == true);
        }
Beispiel #2
0
        public void getIDProof()
        {
            // Arrange
            IDProofController controller = new IDProofController();

            var actResult = controller.Get(1);
            // Act
            var result = actResult as OkNegotiatedContentResult <IDProof>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.ID == 1);
        }
Beispiel #3
0
        public void PostIDProof()
        {
            // Arrange
            IDProofController controller = new IDProofController();

            IDProof IDProofObj = new IDProof
            {
                Value    = "123456",
                Comments = "Good Work",
            };
            var actResult = controller.Post(IDProofObj);
            // Act
            var result = actResult as OkNegotiatedContentResult <IDProof>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.ID > 0);
        }
Beispiel #4
0
        public void PutIDProof()
        {
            // Arrange
            IDProofController controller = new IDProofController();

            IDProof IDProofObj = new IDProof
            {
                Value    = "Put request sucessfull",
                Comments = "Good Work",
                ID       = 1
            };
            var actResult = controller.Put(1, IDProofObj);
            // Act
            var result = actResult as OkNegotiatedContentResult <IDProof>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.Value.Equals("Put request sucessfull"));
        }