public void Constructor_InitializeNewObject_WhenInvalidParameterPassed() { // Arrange var assemblyName = typeof(SofiaMenuProvider_Should).Assembly.GetName(); var testingNamespace = typeof(SofiaMenuProvider_Should).Namespace; var condimentsNamespace = typeof(SofiaMenuProvider_Should).Namespace; // Act var sofiaMenuProvider = new SofiaMenuProvider(assemblyName, testingNamespace, testingNamespace, condimentsNamespace); // Assert Assert.That(sofiaMenuProvider, Is.Not.Null); Assert.That(sofiaMenuProvider, Is.InstanceOf <IMenuProvider>()); Assert.That(sofiaMenuProvider.GetType().Name, Contains.Substring("SofiaMenuProvider")); }
public void GetCoffeeCondiments_ReturnCollectionOfCoffeCondimentNamesAsString_WhenInvalidParameterPassed() { // Arrange var testingAssemblyName = typeof(SofiaMenuProvider_Should).Assembly.GetName(); var testingCommonCoffeeNamespace = typeof(FakeEspresso).Namespace; var testingSpecialCoffeeNamespace = typeof(FakeDoppio).Namespace; var condimentsNamespace = typeof(FakeMilk).Namespace; var sofiaMenuProvider = new SofiaMenuProvider( testingAssemblyName, testingCommonCoffeeNamespace, testingSpecialCoffeeNamespace, condimentsNamespace); // Act var coffeeTypesList = sofiaMenuProvider.GetCoffeeCondiments(); // Assert Assert.That(coffeeTypesList, Has.Member(typeof(FakeMilk).Name)); }