Exemplo n.º 1
0
        public void Translate_WhenCalled_CallsExpectedTranslator()
        {
            // Arrange
            var source = new FakeObject1();
            // Act
            var destination = this.processor.Translate <FakeObject2>(source);

            // Assert
            this.translator1To2.Received(1).Translate(source);
        }
Exemplo n.º 2
0
        public void Map_WhenCalled_CallsExpectedMapper()
        {
            // Arrange
            var source      = new FakeObject1();
            var destination = new FakeObject2();

            // Act
            this.processor.Map(source, destination);
            // Assert
            this.mapper1To2.Received(1).Map(source, destination);
        }
Exemplo n.º 3
0
        public void FakeObject1()
        {
            var stringFakeObject1 = "         1valor da prop 2     201706240000012500valor para s";

            var fakeObject1 = new FakeObject1
            {
                Property1 = 1,
                Property2 = "valor da prop 2",
                Property3 = new DateTime(2017, 06, 24),
                Property4 = (decimal)12.5,
                Property5 = "valor para ser cortado"
            };

            Assert.Equal(stringFakeObject1, fakeObject1.GenerateString());
        }