Exemplo n.º 1
0
        public void If_The_Content_Is_Null_Or_Empty_A_Failure_Result_Will_Be_Returned()
        {
            //
            // Arrange
            //
            var mockedLogger = new Mock <ILogger <JsonPeopleDataConverter> >();
            var converter    = new JsonPeopleDataConverter(mockedLogger.Object);
            //
            // Act
            //
            var operationWithNull  = converter.Convert(null);
            var operationWithEmpty = converter.Convert(string.Empty);

            //
            // Assert
            //
            Assert.False(operationWithNull.Status);
            Assert.False(operationWithEmpty.Status);
        }
Exemplo n.º 2
0
        public void If_The_Content_Is_Invalid_A_Failure_Result_Will_Be_Returned()
        {
            //
            // Arrange
            //
            var mockedLogger = new Mock <ILogger <JsonPeopleDataConverter> >();
            var converter    = new JsonPeopleDataConverter(mockedLogger.Object);
            //
            // Act
            //
            var operation = converter.Convert("blah");

            //
            // Assert
            //
            Assert.False(operation.Status);
        }