Пример #1
0
        public void CanGetTypesFromCollectionImplementingInterface()
        {
            var assembly = typeof(Foo).GetTypeInfo().Assembly;

            SystemUnderTest.Add(assembly);
            var types = SystemUnderTest.GetTypesImplementing(typeof(IFoo));

            Assert.Collection(types, item => Assert.Equal(typeof(Foo), item));
        }
Пример #2
0
        public void Add()
        {
            //arrange
            double val1          = 2;
            double val2          = 3;
            double expectedvalue = 5;
            //act
            //    var sut = new Calculator();
            double actual = SystemUnderTest.Add(val1, val2);

            //assert
            Assert.AreEqual <double>(expectedvalue, actual, "Wrong Result");
        }
Пример #3
0
 protected override void When()
 {
     SystemUnderTest.Add(new Number(5));
 }
Пример #4
0
        public void CanAddType()
        {
            var assembly = typeof(Foo).GetTypeInfo().Assembly;

            SystemUnderTest.Add(assembly);
        }